I’ve got this to define a recent daily high and daily low:
Timeframe(Daily)
RecentHigh = highest[52](close)
RecentLow = lowest[52](close)
Timeframe(default)
//rest of code goes here
Where default should be the 1 second timeframe that the strategy runs in.
When it uses the variables RecentHigh or RecentLow, it isn’t using the daily values. It seems to be using the highest 52 second close and so on… ?
Did you try to GRAPH these 2 variables?
Also, if you dont use “updateonclose”, the Highest/Lowest will continue to be calculated on each 1 second bar, while if you use it the daily high/low will be updated on the next daily bar open only.
Ah that’s helpful, using “updateonclose”, thank you.