Skip to content
All library documents

Donchian Channel Breakouts with SMA and Session Filters

Article Strategy library · Author: Khanhtq26

Summary

This script describes a Donchian breakout strategy for a Vietnamese index futures contract. It compares the close with the prior channel boundaries, calculated from the highest high and lowest low over a configurable lookback. Using prior-bar channel values is intended to avoid look-ahead bias. A configurable SMA trend filter allows long breakouts when the SMA is rising and short breakouts when it is falling; users can also choose trade direction, session hours, and stop-loss and take-profit distances.

The available document is truncated partway through the source, before the full order and exit logic can be reviewed. It provides no backtest period, performance results, or discussion of realized risks, so the presence and exact behavior of the configured filters and exits cannot be independently assessed from this excerpt. The strategy structure nevertheless illustrates a common channel-breakout approach with trend, time-of-day, and fixed-distance risk controls; its settings would need evaluation on the intended contract and trading schedule.

Key ideas

  • The channel boundaries use prior-bar highs and lows over a configurable lookback.
  • A close above the upper boundary or below the lower boundary forms a raw breakout signal.
  • The optional SMA filter uses its slope to restrict long and short trades by trend direction.
  • Inputs allow users to select trading direction, session hours, stop distance, and take-profit settings.
  • The source is truncated before the complete order logic, and no performance evidence is provided.

Tags

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