![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Hi all,
I need help understanding the behaviour of MACD sample EA that is downloaded with the MetaTrader 4.
I ran the EA with the default settings on USDCAD, H1. The interesting period is 2015.07.31 to 2015.08.06. The EA opens a sell order on 2015.07.31 that ends with a huge loss on 2015.08.06. My question is: Why didn't the trailing stop kick in? If one looks at the mql4 code it is clear that the condition on line 127 is not fulfilled to close the trade. However, the conditions on lines 136-140 should be fulfilled. The trade continued to be open in spite of these conditions.
Anyone knows what is the reason for that? And how to solve it?
Any help is welcome. Thanks in advance.
Regards