OPEN-SOURCE SCRIPT
TMNT3 [v5, Code Copilot] with Pyramid

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
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
- Objectivity & Discipline: Rules-based entries, exits, and sizing remove emotional guesswork.
- Adaptive to Market Conditions: ATR stops and pyramiding adapt to both calm and turbulent phases.
- Scalable: Toggle between short and long breakout horizons to suit different assets or timeframes.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。