Why these two indicators show different result
In A buffer3 is a buffer, it is asSeries. Therefor iMA(5) knows you mean (5 + 6 + 7...)/n.
In B buffer3 is an array, not asSeries. Therefor iMA(5) wants ( 5 + 4 + 3...)/n which doesn't work.
Set the array to series, before populating it.
ArraySetAsSeries - Array Functions - MQL4 Reference
Thank you very much, it work now
hello, can anyone know why these two indicators show different result?
Indi_A.mq4 is original code
Indi_B.mq4 is my changed code
I want Indi_B show as Indi_A's result