Standard deviation of price differences

 
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 :)
 
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