I have a strategy that enters a limit order for the next day on bar close. For example, if the setup condition is met, strategy enters a long limit order 1% below the close price. If the limit is not met the next day, the strategy does not enter on that signal.
However, on backtesting, the order is executed at the limit price even if the open is lower than the limit. Obviously, in real life the order would be executed on or near the open because it is better than the limit price.
It makes quite a big difference to the strategy result. Is there a way to fix this?
TIA,
Comment