Hi, I use iMA(NULL,PERIOD_H1,8,0,MODE_SMA,PRICE_CLOSE,0) to calculate the simple moving average values. However, it seems the results are not correct. Taking October 11th, 12:00pm to 14:00pm EUR/JPY for example. If we insert an indicator SMA(8), close price, the values are 166.40, 166.54 and 166.62. However, if I use the function
iMA(NULL,PERIOD_H1,8,0,MODE_SMA,PRICE_CLOSE,0), or
iMA(NULL,0,8,0,MODE_SMA,PRICE_CLOSE,0), the values are 166.3925, 166.5163, 166.635. The difference of the 2nd and the 3rd one are quite large.
I calculated by hand, the values of the curve inserted by Metatrader are correct, while the values calculated by iMA() are wrong. Could anyone tell me where the problems are? Many thanks!
iMA(NULL,PERIOD_H1,8,0,MODE_SMA,PRICE_CLOSE,0), or
iMA(NULL,0,8,0,MODE_SMA,PRICE_CLOSE,0), the values are 166.3925, 166.5163, 166.635. The difference of the 2nd and the 3rd one are quite large.
I calculated by hand, the values of the curve inserted by Metatrader are correct, while the values calculated by iMA() are wrong. Could anyone tell me where the problems are? Many thanks!