struggling to fix this. I want avgDailyRange to be displayed on ALL timeframes. Idea is to show ADRD for daily and lower timeframes, and replace ADRD with ADR on higher timeframes.
Currently I get an error on lower than Daily timeframes (see screenshot). It shows ADR and ADRD values on higher than daily timeframes, although ADRD acts strangely (changes its value few seconds after initial display).
Can anyone suggest neat solution?
ADRD = request.security(syminfo.tickerid, "D", avgDailyRange)
float[] ADR = timeframe.in_seconds() > timeframe.in_seconds("D")? request.security_lower_tf(syminfo.tickerid, "1D", avgDailyRange) : na
Tried resources online, pinescript manual.