Vanguard | Volatility-Adaptive Donchian Trend Strategy by blitz_locked

By blitz_locked

Performance Metrics

Description

Vanguard is a trend-following Donchian breakout strategy that only trades when several independent filters agree. Most breakout strategies lose money in chop and during fake-outs. Gatekeeper tries to avoid those conditions by gating every entry through volatility, efficiency, higher-timeframe pressure and trend-alignment checks.How it worksVolatility-adaptive channel. ATR/price is ranked against its recent history. In a calm regime the strategy uses a shorter Donchian lookback for earlier entries. In a volatile regime it switches to a longer one that needs a bigger break.Efficiency gate. A Kaufman efficiency ratio measures how directly price has travelled. Breakouts in choppy, directionless conditions are skipped.Higher-timeframe liquidity tension. The previous higher-timeframe bar’s midpoint and range are compared to price. The efficiency-weighted result feeds a tension state that builds quickly and releases slowly. Longs need bull tension and shorts need bear tension. The HTF can be set automatically from the chart timeframe.Price-time correlation. The correlation between price and bar index must agree with the trade direction.Volume acceptance. Breakouts need above-average relative volume. This is skipped on symbols without volume data.Breakout buffer. The close must clear the channel by a fraction of ATR, which removes marginal pokes.Adaptive defense. The trailing stop blends a fast and a slow Donchian channel. When price has consistently held the favorable side of the channel, the stop is allowed to relax toward the wider one, giving established trends room to pull back.Midpoint pullback re-entries. While a trend is active and the strategy is flat, it can re-enter when price dips to the channel midpoint and closes back in trend direction. A cooldown applies after each exit.Trade managementPosition size is risk-based, defaulting to 1% of equity per trade, and capped at 1x equity (no leverage).The initial stop is the adaptive defense, clamped between minimum and maximum ATR distances.It takes partial profit (default 50%) at a configurable R multiple, then moves the stop to breakeven.The remainder trails on the adaptive defense.FeaturesEvery filter has its own toggle, so you can test each one’s contribution.Long & Short, Long Only and Short Only modes.Chart overlay with the adaptive channel, midpoint, defense line, state-colored candles, and markers for breakouts and pullbacks.Info table showing trend, volatility regime, efficiency, HTF tension, correlation and the HTF in use.Commission and slippage are included in the default settings.TipsIt is designed for liquid, trending markets on the 1H and 4H timeframes. Very low timeframes tend to be dominated by costs.Check the trade count, not just net profit. Fewer than about 30 trades is statistically weak.Toggle filters off one at a time to see which ones help on your symbol.On assets with a long-term upward drift, Long Only is often cleaner.Raise the efficiency minimum or tension threshold for fewer, higher-conviction trades. Lower them for more activity.Adjust commission and slippage in the strategy properties to match your broker.WarningsThis is an educational tool, not financial advice. Past performance does not guarantee future results.Backtests don’t capture real-world factors like gaps, liquidity, partial fills or changing spreads.Entries fill at the next bar’s open, and stop and target fills are simulated from bar data, so live execution will differ.Heavy parameter tuning to one chart will overfit. Test across several symbols and periods.Trend-following strategies have long stretches of small losses in sideways markets and depend on a few large winners.Risk-based sizing limits the loss per trade but cannot prevent gap losses beyond the stop.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView