Download MetaTrader 5
To add comments, please log in or register
Manage agents in your profile. It is easy!
vsmt
5
vsmt 2016.09.16 19: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 :)
JC
1395
JC 2016.09.16 19: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 

/
To add comments, please log in or register