OPEN-SOURCE SCRIPT

TMNT3 [v5, Code Copilot] with Pyramid

336
Core Principles
Trend-Following Breakouts

Enters on clean price breakouts above the prior N-day high (System 1: 20 days; System 2: 55 days).

Exits on reversals through the prior M-day low (System 1: 10 days; System 2: 20 days).

Volatility-Based Stops

Uses the Average True Range (ATR) to set a dynamic stop-loss at

Stop = Entry Price ± (ATR×Multiplier)
Stop= Entry Price-(ATR×Multiplier)
Adapts to changing market noise—wider stops in volatile conditions, tighter in calm markets.

System 1 vs. System 2 Toggle

System 1 (20/10) for shorter, faster swing opportunities.

System 2 (55/20) for catching longer, more powerful trends.

Pyramiding into Winners

Scales into a position in fixed “units” (each risking a constant % of equity).

Adds an extra unit each time price extends by a set fraction of ATR (default 0.5× ATR), up to a configurable maximum (default 5 units).

Only increases exposure when the trend proves itself—managing risk while maximizing returns.

Strict Risk Management

Each unit carries its own ATR-based stop, ensuring no single leg blows out the account.

Default risk per unit is a small, fixed percentage of total equity (e.g. 1% per unit).

Visual Aids & Confirmation

Overlaid entry/exit channels and trend/exit lines for immediate context.

Optional on-chart labels and background shading to highlight active trade regimes.

Why It Works
  1. Objectivity & Discipline: Rules-based entries, exits, and sizing remove emotional guesswork.
  2. Adaptive to Market Conditions: ATR stops and pyramiding adapt to both calm and turbulent phases.
  3. Scalable: Toggle between short and long breakout horizons to suit different assets or timeframes.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.