Need Help Backtesting Error
-
Hello,
@fxdreema
I hope you are doing well.
I need an end solution to a problem I am facing in closing trade error in MT5 Backtesting.Closing position/trade error: Market is closed (10018)
I have tried few things but that work only in single pair.
When I used multiple pair to trade then this solution didn't work.
Problem occur when I use CLOSE POSITIONS blue block.
I have search a lot of thread but no body have a simple solution to it and a lot of people seeking help in this -
Not long ago this issue has been discussed and workarounds were given
-
-
@forexbob-0 this error simply appears because we are giving instructions to the broker both to open or close orders/pending orders outside the broker's working hours. The most logical solution from my point of view is to put a time filter, and weekday filter also, just before opening orders and just before closing them. With this solution I have never encountered such problems neither in live nor in backtest.

-
@ambrogio I also utilize Time Filter block to avoid market closed errors.
-
