It's common that errors like this occur when you set a wrong currency when testing in the backtest. If your currency is in USD, set it to USD. Just for instance, I did a test and changed my strategy tester currency (changed it from USD to EUR) and even when I set it back to USD, my strategy tester stopped working correctly and only came back when I restarted the terminal.
Thanks for your reply.
I am testing in the base currency so there is no issue from that.
I've looked at every part of the code where OP_SELL is used and can't fund anything that would stop a sell order from opening in strategy tester, expecially since it operates fine in live trading.
Does any one have any ideas as to why this is happening?
I'm really stumped here and can't find anything that would prevent sell orders from opening in strategy tester.
Does any one have any ideas as to why this is happening?
I'm really stumped here and can't find anything that would prevent sell orders from opening in strategy tester.
Did you check that the Expert Properties are set to open in both direction ?
Hi
It might be also the EA issue – do you have the code? Maybe there is something coded in the EA that blocks sell trades? Or there might be any conditions that are read from live markets only.
In mt4 you can also specify in general inputs which direction is allowed only (so you might set only Long or only short – and only those trades would be opened then). You can check if yo didn’t choose such option.
Best Regards
Also, either share some code so we can reproduce the error (if you don't want to share your EA's code, just create a simple test one that also don't open short positions and share it with us) or debug your code by setting some breakpoints around the code that should be sending sell orders. If the breakpoints are never triggered, for sure there's some part of your code that is stopping the EA from sending sell orders.
I can't share the source code as its a project that once completed I will maybe put on the market.
I did put prints statements to try find where the problem might be but nothing came up, everything was fine.
There is no issue in live market trading, it trades fine opening both buy and sell orders, its only happening in strategy tester so running any back tests is inaccurate.
I can't share the source code as its a project that once completed I will maybe put on the market.
I did put prints statements to try find where the problem might be but nothing came up, everything was fine.
There is no issue in live market trading, it trades fine opening both buy and sell orders, its only happening in strategy tester so running any back tests is inaccurate.
Hello. Did you come up with a solution to this? I am also experiencing the same with MT5.
eventually i loaded an earlier version and retested that, it had previously completed many doezens of successful tests with plenty of historical data, I found even when i matched previous known good inputs and settings the line was flat no open trades.
This patern repeated itself down all versions
After much tweaking of settings i found one version that entered one trade (they previously had entered trades daily) looking at the one trade it entered, the logic made no sense, the only way it could have made the entry based on the trade entry logic is if the trade limit order had been triggered and then requoted for 2 hours finally having a price accept 100 odd points higer than the origional entry point.
Removing the tester folder, and trying on different data made no difference... its like the tester just decided to quit.

- 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, I have a custom EA that works fine in the live market, but when doing a back test in the strategy tester, it does not open sell orders. There are no errors or warnings; it just doesn't open sell orders. I've checked every possible reason that might be the reason why it does not open sell orders, but I can't find anything, especially since it works fine in the real market and it opens both buys and sells. I've checked my PC, strategy tester settings being used, and everything is normal. I'm really stumped as to why it's doing this, as it shouldn't. Has anyone experienced this before? If so, any ideas or suggestions on how to solve it? Thank you.