Question regarding SMA

 

I'm new to MQL4, and I'm wondering if someone can answer this simple question. I want to compare the value of the current SMA(20 bars) to the

previous SMA(20 bars).


Here is my code. Is this correct? I basically changed the shift value to 1:


if ((iMA(NULL,0,20,0,MODE_SMA,PRICE_TYPICAL,0)) > (iMA(NULL,0,20,0,MODE_SMA,PRICE_TYPICAL,1)))

return (true);



What is the difference between ma_shift and shift? Yes, I read the docs, but I am still confused.



Thanks!

Reason: