Basically I want to calculate the percentage of bars that closed between two calculated values. Not even sure if it's possible.
I tried ta.barsince, the math.sum function but couldn't get it. I think I'm just barely missing it and just need a push in the right direction
//@version=5
indicator("ATR Projection", overlay=true)
// Input for ATR length
atrLength = input(14, title="ATR Length")
// Calculate ATR
atr = ta.atr(atrLength)
// Calculate projected price
projectedPrice = close + atr/2
// Calculate projected price
projectedPrice1 = close - atr/2