ok, fed up with btc-parkinson-seismographe, faced with this oscillating market, I created an indicator based on my own observations: btc likes to break resistances and come back like a poodle in its range, so I coded this behavior in addition to the range.
like that we can really know when it leaves its range ... and resume the normal indicators.
//@version=6 indicator("level",overlay=true) range = input.int(33,"range") nh = ta.highest(close,range) nb = ta.lowest(close,range)
ranges = nh-nb
if ( close > nb and close < nb+( ranges/4) or close > nh+( ranges/4) ) label.new(bar_index, low, "B", style=label.style_label_up, color=color.green, textcolor=color.white) // so if it is close to the top or if it smashes its support from afar if ( close < nh and close > nh-( ranges/4) or close < nb-( ranges/4) ) label.new(bar_index, high, "S", style=label.style_label_down, color=color.red, textcolor=color.white)