Hi @
petrz
Thank you very much! Your version runs way faster and it taught me many things I didn't know about Tickblaze.
By the way, with regards to the two data series setups:
1) Daily bars consisting of minutes where the strategy is invoked on every update
2) Minute bars consisting of minutes where the strategy is invoked on bar close
My assumption was that there shouldn't be much difference (assuming that the code is adjusted for every option) between them as the "OnBarUpdate" function will be executed every minute anyway. Do I miss something?
My quant friend, that innocent sentence "there shouldn't be much difference" makes all the difference in the world

You know what they say ... The devil is in the details. Let me explain.
You are right in the big picture, but the crucial difference lies in the Script Functions - the result is different when they are called on a 1min bar (with On Bar Close) or the Daily bar built from 1 min (with On Bar Update).
Specifically:
1) The function
TotalDataCount() < 390 on a Daily bar will now skip 1.5 years worth of data
2) The function
SessionIsFirstBar() will return true on every minute update you evaluate it, because there really is only 1 bar for the session, updated every minute.
3) the function
DataIsMissing() now evaluates Daily bars, not small data gaps in the 1 minute data (this actually makes a difference of 1 trade on GME)
4) The function
BrokerMarketOnClose() handles closing the position differently on a Daily bar built from minute bars with On Bar Update (it will close the position on next bar update), so you have to write a different exit block.
Not to mention one important thing - when you invoke the strategy with On Bar Update settings in LIVE mode, it will be updated on each new incoming TICK, no matter what source bars its built from. So On Bar Update setting in LIVE mode does not match the behavior in the BACKTEST mode (unlike On Bar Close setting, which behaves the same in both BACKTEST/LIVE mode).
Practically speaking, in order to make the script work with Daily bars built from 1 minute bars with On Bar Update settings, you would have to make several important changes to my script - like this ... se my version 2 of the script.
tickblaze_strategy_gapupreverse_v2.zip
This version will work with both Data Series settings. But it might produce different results because of how the functions handle bars. For example, the version running on 1 minutes bars with On Bar Close will leave out a
trade opportunity GME on 02/25/2021, but the version running on Daily bars with On Bar Update will make the trade. Why the discrepancy? Because the 1 minute On Bar Close version is checking for intraday missing data using the function
DataIsMissing(0) and
DataIsMissing(1), and when GME started gapping like crazy in 2021, it had a lot of intraday data gaps like this...