Skip to content
All library documents

Trading Donchian Basis Crosses with Band Targets and ATR Stops

Article TradingView scripts

Summary

This strategy builds a Donchian channel from the highest high and lowest low over a lookback period and defines its basis as the midpoint of those bands. It enters long when the close crosses above the basis and short when it crosses below, provided the trade is inside the chosen date window and, optionally, the configured session. New entries are allowed only while flat.

For each entry, the script places a stop loss at a multiple of ATR from the closing price and sets a limit target at the corresponding outer channel band. It plots the channel, basis, active stop and target levels, and reports net profit, win rate, and profit factor from the strategy backtest. The document supplies the rules and dashboard calculations but no reported test results, transaction cost assumptions, or comparison against alternatives. Outcomes may depend heavily on the selected market, timeframe, date window, and session; the displayed historical metrics alone do not demonstrate robustness or future performance.

Key ideas

  • The Donchian basis is the midpoint between the lookback period’s highest high and lowest low.
  • A close crossing the basis triggers a directionally corresponding entry when date and session filters pass.
  • ATR sets the stop distance, while the opposite outer channel band provides the profit target.
  • The script displays backtest summary metrics but supplies no evidence of out-of-sample robustness.

Tags

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