iMAonArray

 

I have been trying to use iMAonArray function now. While looking at the following syntax, I am not very clear on how to set total and period parameter correctly.


double iMAOnArray( double


array[], int total, int period, int ma_shift, int ma_method, int shift)

total - The number of items to be counted. 0 means whole array.
period - Averaging period for calculation.

If I am trying to calculate the 14 period MA of RSI, definitely I need to set the period to be 14, but how about total, do I need to set it to be 0 in order to use the whole array or can I also set it as 14?


Thank you.
 

Hi investmoneylab,

Set total=0 to calculate MA over the entire array with period=14.

You can check also my site.. there is already a MA of RSI indy.

Regards.

Reason: