OPEN-SOURCE SCRIPT
Actualizado

Turtle ATR Channel Breakout

658
🐢 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.

imagen

📊 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.
Notas de prensa
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.

Exención de responsabilidad

La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.