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.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.