Some of my rules (to detect something) gives false alarms for an hour after Market Open (or simply just not defined well enough anyways, ha-ha). Since I can locate the moment of Market Open, I can address bars relatively to it which is kinda cool. Is there a way to specify offset by time to make it undependent to (sub-hour) timeframe?
For example in my code, MarketOpen
rule is true
if the current the moment of Market Open is still in the current bar (so it addresses the bar of MarketOpen
in any timeframe). In 1H timeframe, it would be simple: not(MarketOpen)
would exclude the first hour, but it should work in sub-hour timeframes, too.