Mql5 the EA Works Correct on Backtest but on Live It's Having Different Behaviour, Not Respecting Rules.
coding for backtesting often requires different coding, than it does for live trading. This has been the rule of strategy tester since forever.
If you want help then, you need to post your code. Otherwise the only further responses you will get are comments such as "we can not read your mind", "we can not see your screen", or my favourite "our crystal balls are broken/cracked".
If you need help, besides showing your code if you need help, also show your log output, trade activity and screenshots.
But before that, add much more Print() calls to your code to better debug the situation on live trading.
Have it print both the Ask and Bid prices, trade requests and results, Indicator values, code logic conditions, etc., at various stages of your strategy.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello , so i got a situation with my one of my EAs , so basically on the backtest everything works fine, trades are set to be when they should and closed when they should , but on live trading , the bot is not setting trades to be , and is not respecting the rule of not opening a new trade if the previous one is not at breakeven. I checked my log and i see that after a trade opened it's also says that the trade was closed , but it's not closed in mt5 , it's just in the log and the ea is not considering it , that's why it's not moving the stop to be when it should or close it. What could cause this? how can a code work perfectly on backtest and not work properly on live? i checked if the magic number interfers with different EAs but it's not the case. Thanks for your response!