MQL4 - automated forex trading   /  

Forum

standard deviation on buffer? why MAs?

Back to topics list To post a new topic, please log in or register

avatar
312
SanMiguel 2012.01.26 17:38 

This function http://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?

Checking the Myth: The Whole Day Trading Depends on How the Asian Session Is Traded

Checking the Myth: The Whole Day Trading Depends on How the Asian Session Is Traded

In this article we will check the well-known statement that "The whole day trading depends on how the Asian session is traded".


avatar
1975
zzuegg 2012.01.26 17:43 

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....


avatar
1975
zzuegg 2012.01.26 18:31 
You are always calculate the same average for each iteration

avatar
312
SanMiguel 2012.01.26 18:46 

I see....MODE_EMA,i instead of MODE_EMA, 0.

Thanks


avatar
1975
zzuegg 2012.01.26 18:51 

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



avatar
4328
WHRoeder 2012.01.26 19:35 
SanMiguel:
iStdDevOnArray has a whole load of functions to do with moving averages?
Better learn what Std Dev is. It is a measure of the average deviation of a bar relative to a moving average of that bar.

avatar
312
SanMiguel 2012.01.26 19:41 

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?

Back to topics list  

To add comments, please log in or register