Standard deviation of price differences

Back to topics list To post a new topic, please log in or register
avatar
1
vsmt 2016.09.16 21:32
 
Hi, I'm using MT4 for the first time and I can't figure out how to calculate the running standard deviation of price differences, i.e., Close_{t} - Close_{t-1} over the last N values using iStdDev? Thanks :)
avatar
1332
jjc 2016.09.16 21:55 #
 
vsmt:
Hi, I'm using MT4 for the first time and I can't figure out how to calculate the running standard deviation of price differences, i.e., Close_{t} - Close_{t-1} over the last N values using iStdDev? Thanks :)

iStdDev will give you the standard deviation of one of a fixed set of values: any of the ENUM_APPLIED_PRICE options. You can use it to calculate the standard deviation of the close prices, the open prices, the highs, the lows etc.

To calculate the standard deviation of anything else, such as the difference between each close price, you need to build your own array of values and then use iStdDevOnArray 

Back to topics list  

To add comments, please log in or register