Skip to content
All library documents

Donchian Breakouts with SMA Trend and Session Filters

Article TradingView scripts

Summary

This intraday futures strategy enters when a closing price breaks above the prior Donchian upper band or below the prior lower band. The bands use the highest high and lowest low over a configurable lookback, shifted back one bar to avoid using the current bar in the channel calculation. An optional simple moving average slope filter allows longs when the average is rising and shorts when it is falling. The script also supports direction selection, configurable stop and target distances, and a trading-session window; open positions are closed when the session ends.

The document identifies VN30F1M, a Vietnamese stock index futures contract, as its intended market and gives default channel, moving average, stop, target, and session settings. It describes signal confirmation at bar close and entry at the next bar’s open, but provides no backtest results or evidence of profitability. The code offers configurable rules rather than validated parameters; slippage, fees, contract-specific execution, and the suitability of the chosen thresholds are not assessed.

Key ideas

  • The strategy triggers entries on closes beyond the previous Donchian channel boundaries.
  • An optional SMA slope filter aligns long and short breakouts with the moving average’s direction.
  • Configurable stop losses, profit targets, and trading hours govern exits and eligibility.
  • The script closes open positions at the configured session end and can trade either direction or both.
  • The document targets VN30F1M but supplies no empirical performance evidence.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.