Alpha Supertrend Vector >_ — Strategy by BVL-Crypto

By BVL-Crypto

Performance Metrics

Description

A triple-validated trend-flip system that enters exclusively at the moment a Supertrend indicator changes direction — the earliest confirmation of a regime change — then requires two independent filters (ADX strength and Choppiness Index) to confirm that the flip is occurring within a genuine trending environment. Exits are managed through ATR%-normalized take profit and stop loss levels, with a secondary hard-cap Plug stop that enforces an absolute maximum loss boundary on every trade regardless of volatility conditions.═══════════════════════════════════════KEY FEATURES═══════════════════════════════════════Supertrend Flip Signal— Enters on the exact bar where Supertrend direction changes polarity— Long trigger: bearish-to-bullish flip (st_dir changes from 1 to -1)— Short trigger: bullish-to-bearish flip (st_dir changes from -1 to 1)— Configurable ATR multiplier and fast ATR length— Supertrend line plotted on chart: green (bullish), red (bearish)Choppiness Index Regime Filter— CHOP Index must be below the configured threshold at signal bar— Measures ATR range relative to total high-low range, log-normalized— Blocks flip entries during sideways, range-bound market conditions— Protects against the most common source of false Supertrend flip signalsADX Directional Strength Filter— ADX must exceed configurable minimum threshold at signal bar— Full DMI calculation using DI+ and DI− via ta.dmi()— Confirms sufficient trend force behind the directional flip— Guards against low-energy drifts that trigger flips without follow-throughATR% Normalized Exits— TP and SL expressed as multiples of ATR% — volatility-proportional by design— ATR% value locked at signal bar via entry_atr_pct variable— Exit levels anchored to strategy.position_avg_price for live execution accuracy— No mid-trade recalculation of the base ATR% — risk profile stays fixedThe Plug — Hard Stop Architecture— Independent hard percentage stop applied to every trade— For longs: avg_price × (1 − Plug%). For shorts: avg_price × (1 + Plug%)— Compared to ATR SL using math.max() / math.min() — tighter stop always wins— Prevents a single volatility spike from breaching a user-defined loss ceiling═══════════════════════════════════════HOW IT WORKS═══════════════════════════════════════Step 1 — Supertrend Flip Detectionta.change(st_dir) evaluates to negative when Supertrend flips from bearish (1) to bullish (-1), and positive when it flips from bullish to bearish. These direction changes represent the earliest available structural confirmation of a trend reversal — before momentum indicators, before moving average crossovers.Step 2 — Choppiness GateThe Choppiness Index (CHOP) measures the ratio of summed 1-bar ATR to total high-low range over the lookback window, log-normalized to a 0–100 scale. Values below the threshold indicate the market is trending. Values above indicate choppiness. Flip signals that occur during high-CHOP environments — where Supertrend is most likely to whipsaw — are filtered entirely.Step 3 — ADX GateADX above the minimum confirms the trend has directional force. Even in trending markets, low ADX can indicate the trend is weak and unlikely to sustain a move through the TP level. Both CHOP and ADX must pass simultaneously with the Supertrend flip for entry to execute.Step 4 — EntryEntry is placed on the signal bar. The ATR% value at that exact moment is captured and stored for use in exit calculations throughout the life of the trade.Step 5 — Exit CalculationTP and SL are calculated dynamically off strategy.position_avg_price using the stored entry_atr_pct. The Plug stop is calculated independently as a fixed percentage from average price. Whichever stop is closer to entry price is applied via math.max() (longs) or math.min() (shorts). The strategy.exit() call runs on every bar while the position is open, ensuring levels remain accurate if average price shifts due to execution variance.═══════════════════════════════════════WHY SUPERTREND FLIPS — NOT SUSTAINED DIRECTION═══════════════════════════════════════Most Supertrend-based strategies enter whenever price is on the bullish or bearish side of the indicator. The Alpha Supertrend Vector enters only at the flip — the single bar where direction changes. This produces a lower-frequency, higher-conviction signal profile. The strategy is not trying to stay in a trend; it is trying to capture the initial thrust at the moment of regime change, before the move becomes consensus and crowded.═══════════════════════════════════════ATR% vs. ATR — THE DISTINCTION═══════════════════════════════════════Raw ATR is price-level dependent — a $5 ATR on a $50 stock is extreme; on a $500 stock, it is mild. By converting to ATR% (ATR / close × 100), exit distances become proportional to the instrument's current price level and volatility regime. A 1.0× ATR% TP means the same thing across different assets, different price levels, and different volatility environments — making the strategy's settings genuinely portable across instruments.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView