limit order not cancelled on correct bar (in backtest)
limit order not cancelled on correct bar (in backtest)
I am backtesting on historical data in regular mode, i.e. IOG disabled and bar magnifier disabled. At the end of one bar the conditions for order submission are no longer active so the limit order entry code is not executed. In which case, my understanding was that the order would be cancelled and not be active for the next bar. However, it appears that the order is getting filled on the next bar. Am I correct on my understanding of how limit orders are handled in the described context?
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: limit order not cancelled on correct bar (in backtest)
Hello Faschim,
The order should be cancelled in this case. How exactly do you determine, if the conditions for that limit order generation are no longer met at close of current bar?
The order should be cancelled in this case. How exactly do you determine, if the conditions for that limit order generation are no longer met at close of current bar?