OPEN-SOURCE SCRIPT
已更新 Turtle ATR Channel Breakout

🐢 Turtle ATR Channel Breakout
Turtle ATR Channel Breakout is a daily trend-following indicator based on an ATR channel breakout variation described in turtle-trading literature.

📊 Channel Calculation
* Basis: 350-day Simple Moving Average (SMA) of closing prices
* Volatility: 20-day Average True Range (ATR) using Wilder’s smoothing
* Upper Band: Basis + 7 × ATR
* Lower Band: Basis − 3 × ATR
🐢 Signal Logic
* A bullish turtle signal is generated when the previous confirmed daily close crosses from at or below the upper band to above the upper band.
* A bearish turtle signal is generated when the previous confirmed daily close crosses from at or above the lower band to below the lower band.
* Signals are displayed on the following trading day, ensuring that each breakout is confirmed by a completed daily close.
* Only the first confirmed close across a boundary generates a signal. If price remains outside the channel for multiple consecutive days, no duplicate signals are produced.
* If price returns inside the channel and later crosses the same boundary again, the new crossing is treated as a new breakout event.
⏱️ Daily Confirmation
The indicator always performs its calculations using daily data, regardless of the chart timeframe.
Intraday highs, intraday lows, and the current unconfirmed daily close are not used to confirm breakout signals. This helps prevent temporary intraday moves from being treated as confirmed breakouts.
⚙️ Customization
The script includes:
* Customizable channel colors
* Customizable bullish and bearish turtle-marker colors
* Optional channel filling
* Optional trend-based bar coloring
* Separate alert conditions for bullish and bearish breakouts
⚠️ Important
This indicator is designed to identify trend breakout events only.
It does not define:
* Position sizing
* Stop-loss levels
* Profit targets
* Portfolio allocation
* Trade execution rules
For research and educational purposes only. This indicator does not constitute financial advice or guarantee future results.
Turtle ATR Channel Breakout is a daily trend-following indicator based on an ATR channel breakout variation described in turtle-trading literature.
📊 Channel Calculation
* Basis: 350-day Simple Moving Average (SMA) of closing prices
* Volatility: 20-day Average True Range (ATR) using Wilder’s smoothing
* Upper Band: Basis + 7 × ATR
* Lower Band: Basis − 3 × ATR
🐢 Signal Logic
* A bullish turtle signal is generated when the previous confirmed daily close crosses from at or below the upper band to above the upper band.
* A bearish turtle signal is generated when the previous confirmed daily close crosses from at or above the lower band to below the lower band.
* Signals are displayed on the following trading day, ensuring that each breakout is confirmed by a completed daily close.
* Only the first confirmed close across a boundary generates a signal. If price remains outside the channel for multiple consecutive days, no duplicate signals are produced.
* If price returns inside the channel and later crosses the same boundary again, the new crossing is treated as a new breakout event.
⏱️ Daily Confirmation
The indicator always performs its calculations using daily data, regardless of the chart timeframe.
Intraday highs, intraday lows, and the current unconfirmed daily close are not used to confirm breakout signals. This helps prevent temporary intraday moves from being treated as confirmed breakouts.
⚙️ Customization
The script includes:
* Customizable channel colors
* Customizable bullish and bearish turtle-marker colors
* Optional channel filling
* Optional trend-based bar coloring
* Separate alert conditions for bullish and bearish breakouts
⚠️ Important
This indicator is designed to identify trend breakout events only.
It does not define:
* Position sizing
* Stop-loss levels
* Profit targets
* Portfolio allocation
* Trade execution rules
For research and educational purposes only. This indicator does not constitute financial advice or guarantee future results.
發行說明
Rewritten as a full Turtle-style breakout system.Channel
- Selectable width basis: standard deviation (original Bollinger Breakout) or ATR, measured in N.
- Presets for 350/2.5, 100/2.0 and 20/2.0, plus custom.
Exits
- Three methods: midline (original), 10-bar Donchian (the exit the turtles actually used), or a trailing N stop.
- Optional 2N hard stop, with intrabar or close-based triggering.
Position sizing
- N-based unit sizing from account equity and risk percentage.
- 0.5N pyramiding up to 4 units, spacing locked to the N captured at entry.
- Automatic drawdown-based size reduction driven by a simulated equity curve.
Filters
- Midline slope, long-term MA, higher timeframe trend, ADX, channel expansion, and the original
"skip if the last breakout was a winner" rule. Filtered breakouts are marked on the chart.
Panel
- Live N, half-width in N (warns when the stop makes the midline exit unreachable), unit count,
quantity per unit, stop and exit levels, active filters, and signal statistics.
Calculation is now locked to daily bars regardless of the chart timeframe.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。