|
|
|
|
| Function | new_macd_struct |
| Include file | MACD_R.H |
| Prototype | MACD *new_macd_struct( int ma_length1 , int ma_length2 , int trigger , int sma_flag ) |
| Remarks | Allocate, initialize and return a virgin moving average convergence / divergence structure. This same structure is also used for calculating MACDHs and DMACs. Set sma_flag to TRUE to calculate simple moving averages and FALSE for exponential averages. |
![]()
| Function | reset_macd_struct |
| Include file | MACD_R.H |
| Prototype | void reset_macd_struct( MACD *macd_ptr ) |
| Remarks | Reset a MACD data structure for a new data series. |
![]()
| Function | update_macd_struct |
| Include file | MACD_R.H |
| Prototype | void update_macd_struct( MACD *macd_ptr , float data ) |
| Remarks | Update the caller's MACD with the new data. Once we have collected enough data to calc the MACD, macd_ptr->enough_data will be set to TRUE and macd_ptr->macd can be used. |
![]()
| Function | free_macd_struct |
| Include file | MACD_R.H |
| Prototype | void free_macd_struct( MACD *macd_ptr ) |
| Remarks | Return the MACD and its sub-structure memory to the system. |
![]()
| Function | calc_emacd |
| Include file | MACD_R.H |
| Prototype | void calc_emacd( MACD *macd_ptr , float data ) |
| Remarks | Calculate a new output value for the given exponential MACD indicator structure using the provided data. |
![]()
| Function | calc_smacd |
| Include file | MACD_R.H |
| Prototype | void calc_smacd( MACD *macd_ptr , float data ) |
| Remarks | Calculate a new output value for the given simple MACD indicator structure using the provided data. |
![]()
| Function | new_macd_ind_struct |
| Include file | MACD_R.H |
| Prototype | MACD_IND *new_macd_ind_struct( int data_cnt ) |
| Remarks | Allocate, and return a virgin moving average convergence / divergence indicator display structure for data_cnt items. |
![]()
| Function | free_macd_ind_struct |
| Include file | MACD_R.H |
| Prototype | void free_macd_ind_struct( MACD_IND *macd_ptr ) |
| Remarks | Return the MACD indicator display structure and its sub-structure memory to the system. |
![]()
| Function | calc_macd_ind |
| Include file | MACD_R.H |
| Prototype | void calc_macd_ind( DATA_REC *data_ptr , int data_cnt , int which_field , MACD_IND *inds , int ma_length1 , int ma_length2 , int trigger , int sma_flag ) |
| Remarks | Calculate a moving average convergence / divergence indicator of ma_length1 and ma_length2 with a trigger length of trigger for the requested field for the DATA_REC data series. The indicator will be built in the caller's MACD_IND indicator display structure inds. While we are at it we'll also calc the MACD histogram. |
![]()
![]()