Calculates the Moving Average indicator on data, stored in array, and returns its value
- Parameters
-
| array | Array with data |
| total | The number of items to be counted. 0 means the whole array |
| period | Averaging period for calculation |
| ma_shift | MA shift. Indicator line offset relate to the chart by timeframe |
| ma_method | Moving Average method. It can be any of following values:
| MODE_SMA | Simple averaging |
| MODE_EMA | Exponential averaging |
| MODE_SMMA | Smoothed averaging |
| MODE_LWMA | Linear-weighted averaging |
|
| shift | Index of the value taken from the indicator buffer (shift relative to the current bar the given amount of periods ago) |
- Returns
- Numerical value of the Moving Average indicator, calculated on data, stored in array