Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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!