Indeed, but you can limit the used array lenght. For example if you only want to know the stdDev for the last 5 bars.
Add: also in the Standart deviation a 'moving average' is used, it's the average of the data in the array.
(If you look at the formula for the standard deviation you will see that an average is needed to calculate the deviation) You maybe better understand first what standard deviation means....
I see....MODE_EMA,i instead of MODE_EMA, 0.
Thanks
Hints:
ArraySize(Buf_0) == BARS will be true for each interation
-> array_av_ct = BARS
only on the last iteration step Buf_0 is a fully filled and initialized array.
-> the key to your solutions is the last parameter of the iMAOnArray function
iStdDevOnArray has a whole load of functions to do with moving averages?
In Excel, you work out the standard deviation on an array of values.
Now, I want to calculate this for the last month only, so I put in 720 bars but it doesn't seem to make a difference?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
This function https://docs.mql4.com/indicators/iStdDevOnArray
iStdDevOnArray has a whole load of functions to do with moving averages?
Isn;t a standard deviation just a simple calculation of the data in the array like in Excel?