OPEN-SOURCE SCRIPT

Turtle Trading Strategy Indicator

84
Turtle Trading Strategy Indicator is a rules-based, long-only breakout indicator built around the legendary Turtle Trading system popularized by Richard Dennis. This indicator visualizes the original Turtle Trading rules on any market and timeframe, making it easy to identify high-probability trend trades, manage risk, and scale into winning positions with pyramiding.

The Turtle Trading strategy is one of the most famous trend-following systems ever created. Richard Dennis famously taught this mechanical trading system to a group of novice traders known as the “Turtles,” proving that disciplined rules and risk management can outperform intuition or prediction. This indicator brings those exact principles into TradingView with clear visuals, signals, and optional filters.

What This Indicator Does

This Turtle Trading Strategy Indicator plots both classic Turtle breakout systems and their corresponding exit rules directly on the chart:

System 1 (20-Day Breakout)
  • Entry when price breaks above the previous 20-day high
  • Exit when price falls below the previous 10-day low
  • Automatically skips the next 20-day breakout after a winning trade, following original Turtle Trading rules


System 2 (55-Day Breakout)

  • Entry when price breaks above the previous 55-day high
  • Exit when price falls below the previous 20-day low
  • Always allowed, even after winning trades


ATR-Based Risk Management

  • Uses ATR(20) to calculate volatility-adjusted stops
  • Stop level updates dynamically and exits the trade when price hits the ATR stop


Pyramiding Logic
  • Adds to winning trades in fixed ATR increments (0.5 N units by default)
  • Maximum of 4 total position units (initial entry plus up to 3 adds)
  • Each add re-anchors the ATR stop to protect profits


Turtle Trading Rules Explained

This indicator follows the core Turtle Trading rules that traders still study today:
  • Trade breakouts, not predictions
  • Let winners run and cut losses quickly
  • Use volatility (ATR) to size risk and stops
  • Add to winning trades, never losing trades
  • Trade mechanically without emotion


These rules form the foundation of many modern trend-following systems and are why the Turtle Trading strategy remains relevant decades later.

Visual Features

  • Donchian channel lines for entries and exits (20-day, 55-day, 10-day, and 20-day levels)
  • Step-style plotting to clearly show breakout trigger levels
  • Color-coded candles for entries, exits, pyramid adds, and ATR stop exits
  • Clean entry and exit labels placed above or below bars
  • Optional toggles for each system, ATR stop, and pyramiding


Who This Indicator Is For

  • Traders studying the Turtle Trading strategy or Richard Dennis trading strategy
  • Swing traders and position traders looking for systematic trend entries
  • Traders who want rule-based entries, exits, and risk management
  • Anyone learning classic turtle trading rules in a visual, practical way


If you are looking for a faithful, chart-based implementation of the Turtle Trading Strategy with clear rules, modern visuals, and strict risk control, this indicator is designed exactly for that purpose. Nothing about this indicator should be construed as financial advice. It is not recommending you to buy or sell anything based on this indicator or the turtle strategy rules.

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.