With Calculate OnBarClose, using a secondary series for logic and a 1 tick series for order fill accuracy, the orders will match. They will be placed at the same time and filled at the same time. Without TickReplay.
TickReplay is used for Calculate OnPriceChange and OnEachTick, not with OnBarClose.
This would apply to real-time as well. If the orders are not placed at the same time in real-time they will have different submission and fill times and will appear on different bars.
The logic is being performed when the 300 Tick bar closes. Perhaps previously you were placing orders during every series updating OnBarUpdate which would cause differences as the data would not be the same for the primary series and we haven't confirmed all other added series are the same.
Same data, same order time, same order fills, same bar (or within the same bar range as the bars may close at different times on different charts).
The 1 tick series is necessary for the order fill accuracy (meaning so orders fill at specific time of a tick and not when the bar closes) historically , but would work the same way in real-time as well. If the script is strictly real-time and does not place orders historically, then the 1 tick series would not be needed.
There should only be prints for BarsInProgress 1, the 300 tick series. Do you want to discuss the output?
Comment