A signal is considered "valid" only if price closes outside the envelope for two consecutive bars. This eliminates the majority of whipsaws. The Xhmaster outputs three states:
// Adaptive Trend Line atr_val = ta.atr(length) rsi_val = ta.rsi(close, 14) dynamic_mult = multiplier_base + (rsi_val / 100) atl = (high + low + close) / 3 - (atr_val * dynamic_mult) Xhmaster Formula Indicator
[ Signal = \fracNMO + 36 \times 100 ]
//@version=6 indicator("Xhmaster Formula Indicator", overlay=true) // Parameters length = input.int(22, "ATR Length") multiplier_base = input.float(1.5, "Base Multiplier") A signal is considered "valid" only if price