Fudo,Fudomyo wrote:hi Mladen. Thank you for helping me with this.
With the new MT4 code I can't figure out how to change the iMA mode.
On the old Vidya version it was easy to find -
double price = iMA(NULL,0,1,0,MODE_SMA,price,i);
How do I change the MA mode on the new one? I can't seem to find it.
The reason I'm asking is, Chande originally used EMA for the volatility oscillator but I noticed a few versions use SMA, so I'd like to test it with different MA modes to find the best fit.
Thanks! Fudo
That iMA() call is a "dirty little trick"
it is used in that form because that is the fastet way to get the desired price in mql (when no custom price types are used)since period is set to 1, regardless of what average type you use the return is always the same (any average with period set to 1 must return the price/value itself), so regardless what ma type you place there, unless the average period is changed from 1 to some other period, no change for the results will happen