However, during backtesting, the entry is on next day open and exit is on the day after next open, which are 1 day late.
How do I change the code such that it enter and exit the way I want it as describe in the first instance? Else my backtest results will be incorrect. Thanks.
Comment