BarsInProgress = 0 -> Range bars
BarsInProgress = 1 -> 15-second bars
CalculateOnBarClose = true
The strategy signal is generated in BIP=0 timeseries, and triggers a market order entry in BIP=1 timeseries.
In Backtest let’s say a signal occurs at end of Range Bar (BIP=0) that closes at 12:00:05.
The 15-second bar (BIP=1) that “overlaps” with the BIP=0 signal bar is the 15-second bar that started at 12:00:00 and ends at 12:00:15.
What surprises me is that in backtest, the market order appears to fill at the opening price of this 15-second bar, i.e. the signal at 12:00:05 results in a fill at a price that occurred at 12:00:00 …
… rather than say the closing price.
So it seems to fill at a “liberal” price, rather than a conservative one.
Is this behavior as expected? Or a bug?
Comment