Evasive SuperTrend [LuxAlgo]The Evasive SuperTrend indicator provides a modernized approach to trend following by implementing a unique "evasive" logic designed to reduce premature trend flips during periods of high market noise and consolidation.
Unlike the traditional SuperTrend which can only move closer to the price (or stay flat), this tool identifies when price action gets too close to the volatility band and "evades" the price by pushing the band further away, effectively giving the current trend more breathing room.
🔶 USAGE
The indicator can be used similarly to a standard SuperTrend to identify trend direction and potential trailing stop levels, but with added intelligence regarding market noise.
🔹 Identifying Trend and Noise
Solid Line: Indicates a standard trend phase where the price is maintaining a healthy distance from the volatility band.
Dotted Line: Indicates the "Evasive" mode is active. This occurs when price action enters a "Noise Zone," causing the indicator to proactively push the band away to prevent a false breakout.
Gradient Fill: The background fill provides a visual heat map of the trend strength relative to the source price, with higher transparency indicating proximity to a potential trend flip.
🔹 Trading Signals
Users can look for "BULL" and "BEAR" labels which mark the points where price successfully penetrates the evasive band. Because the band actively retreats during noise, a trend flip often carries more significance as it requires price to overcome an adaptive volatility threshold.
🔶 DETAILS
The core innovation of this script is the "Noise Avoidance Logic." Standard SuperTrends are strictly monotonic (they only move up in a bull trend and down in a bear trend). This often leads to "whipsaws" where a minor price spike touches the band and flips the trend unnecessarily.
The Evasive SuperTrend calculates a Noise Threshold . If the distance between the price and the band is less than this threshold (calculated in ATR units), the band is pushed back by a specified Expansion Alpha . This allows the trend to persist through choppy sideways movement that would otherwise trigger a reversal.
🔶 SETTINGS
🔹 Supertrend Settings
ATR Length: Determines the lookback period for the Average True Range calculation used to set the band distance.
Base Multiplier: Sets the initial distance of the band from the price. Higher values result in fewer, longer-term trend signals.
🔹 Noise Avoidance Logic
Noise Threshold (xATR): Defines the "danger zone" around the band. If price enters this ATR-based range, the band begins to evade.
Expansion Alpha (xATR): The distance the band moves away from the price when noise is detected. Higher values make the indicator more "stubborn" against trend changes.
🔹 Visualization
Show Signal Labels: Toggles the visibility of the BULL and BEAR trend change labels.
Show Gradient Fills: Toggles the dynamic background coloring between the price and the band.
Pine Script® indicator






















