TradingCharts
StrategyOpen sourcev6

Turtle trading strategy (Donchian/ATR)

What it does

Classic Turtle breakout system built on Donchian channels with an ATR stop.

Entry: buy when price breaks the highest high of the last 20 bars (Enter Channel).

Exit: the tighter of the 10-bar low (Exit Channel) or entry − 2.3 × ATR(20).

Direction: Long, Short or Both.

On the chart: green step lines = entry and exit channels, thick red = live stop, blue BUY / red EXIT badges = actual fills.

Channels use completed bars only, so it does not repaint. Default 0.03% commission per order. Change it in Properties to match your broker.

For education and backtesting, not financial advice.

How to use it

  • Open the charts and go to Indicators › My scripts › Shared with me (or search the Community library) and press Add to chart.
  • Open it in the ChartScript Editor to read the code; Create a copy makes your own editable version.

Version history

  • v6 — 28 Nov, 08:09 am · compiler 0.3.70
  • v5 — 28 Nov, 08:04 am · compiler 0.3.70
  • v4 — 28 Nov, 07:59 am · compiler 0.3.70
  • v3 — 28 Nov, 07:58 am · compiler 0.3.70
  • v2 — 28 Nov, 07:56 am · compiler 0.3.70
  • v1 — 28 Nov, 07:54 am · compiler 0.3.70

#turtle-trading#donchian-channel#breakout#trend-following#atr-stop-loss#swing-trading#strategy#nifty