OPEN-SOURCE SCRIPT
Turtle System 1 (20/10) + N-Stop + MTF Table V7.2

🐢 Description: Turtle System 1 (20/10) IndicatorThis indicator implements the original trading signals of the Turtle Trading System 1 based on the classic Donchian Channels. It incorporates a historically correct, volatility-based Trailing Stop (N-Stop) and a Multi-Timeframe (MTF) status dashboard. The script is written in Pine Script v6, optimized for performance and reliability.📊 Core Logic and ParametersThe system is a pure trend-following model, utilizing the more widely known, conservative parameters of the Turtle System 1:FunctionParameterValueDescriptionEntry$\text{Donchian Breakout}$$\mathbf{20}$Buy/Sell upon breaking the 20-day High/Low.Exit (Turtle)$\text{Donchian Breakout}$$\mathbf{10}$Close the position upon breaking the 10-day Low/High.Volatility$\mathbf{N}$ (ATR Period)$\mathbf{20}$Calculation of market volatility using the Average True Range (ATR).Stop-LossMultiplier$\mathbf{2.0}
SETS the initial and Trailing Stop at $\mathbf{2N}$.🛠️ Key Technical Features1. Original Turtle Trailing Stop (Section 4)The stop-loss mechanism is implemented with the historically accurate Turtle Trailing Logic. The stop is not aggressively tied to the current candle's low/high, which often causes premature exits. Instead, the stop only trails in the direction of the trend, maximizing the previous stop price against the new calculated $\text{Close} \pm 2N$:$$\text{New Trailing Stop} = \text{max}(\text{Previous Stop}, \text{Close} \pm (2 \times N))$$2. Reliable Multi-Timeframe (MTF) Status (Section 6)The indicator features a robust MTF status table.Purpose: It calculates and persistently stores the Turtle System 1 status (LONG=1, SHORT=-1, FLAT=0) for various timeframes (1H, 4H, 8H, 1D, and 1W).Method: It uses global var int variables combined with request.security(), ensuring the status is accurately maintained and updated across different bars and timeframes, providing a reliable higher-timeframe context.3. VisualizationsChannels: The 20-period (Entry) and 10-period (Exit) Donchian Channels are plotted.Stop Line: The dynamic $\mathbf{2N}$ Trailing Stop is visible as a distinct line.Signals: plotshape markers indicate Entry and Exit.MTF Table: A clean, color-coded status summary is displayed in the upper right corner.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.