4880127477:
in the below code `if(sma5_after > sma18_after)` never is true while this condition is repeated many times in the chart
I use Mql4 in meta trader4
Please Help Me
thank you
Because you compare the 5 sma to itself.
sma5_befor = iMA(_Symbol,_Period,5,0,MODE_SMA,PRICE_CLOSE,2); sma5_after = iMA(_Symbol,_Period,5,0,MODE_SMA,PRICE_CLOSE,0); ... sma18_befor = iMA(_Symbol,_Period,18,0,MODE_SMA,PRICE_CLOSE,2); sma18_after = iMA(_Symbol,_Period,5,0,MODE_SMA,PRICE_CLOSE,0);
Laszlo Tormasi:
Because you compare the 5 sma to itself.
Oh God, what a ridiculous mistake I made! :)
Thank you dear friend
Good luck
Topics concerning MT4 and MQL4 have their own section.
In future please post in the correct section.
I have moved your topic to the MQL4 and Metatrader 4 section.
Keith Watford:
ok, thank you
Topics concerning MT4 and MQL4 have their own section.
In future please post in the correct section.
I have moved your topic to the MQL4 and Metatrader 4 section.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I use Mql4 in meta trader4