OPEN-SOURCE SCRIPT

Grok/Claude Turtle Soup Strategy

100
# 🥣 Turtle Soup Strategy (Enhanced)
## A Mean-Reversion Strategy Based on Failed Breakouts

---

## Historical Origins

### The Original Turtle Traders (1983-1988)

The Turtle Trading system is one of the most famous experiments in trading history. In 1983, legendary commodities trader **Richard Dennis** made a bet with his partner **William Eckhardt** about whether great traders were born or made. Dennis believed trading could be taught; Eckhardt believed it was innate.

To settle the debate, Dennis recruited 23 ordinary people through newspaper ads—including a professional blackjack player, a fantasy game designer, and an accountant—and taught them his trading system in just two weeks. He called them "Turtles" after turtle farms he had visited in Singapore, saying *"We are going to grow traders just like they grow turtles in Singapore."*

The results were extraordinary. Over the next five years, the Turtles reportedly earned over **$175 million in profits**. The experiment proved Dennis right: trading could indeed be taught.

#### The Original Turtle Rules:
- **Entry:** Buy when price breaks above the 20-day high (System 1) or 55-day high (System 2)
- **Exit:** Sell when price breaks below the 10-day low (System 1) or 20-day low (System 2)
- **Stop Loss:** 2x ATR (Average True Range) from entry
- **Position Sizing:** Based on volatility (ATR)
- **Philosophy:** Pure trend-following—catch big moves by riding breakouts

The Turtle system was a **trend-following** strategy that assumed breakouts would lead to sustained trends. It worked brilliantly in trending markets but suffered during choppy, range-bound conditions.

---

### The Turtle Soup Strategy (1990s)

In the 1990s, renowned trader **Linda Bradford Raschke** (along with Larry Connors) observed something interesting: many of the breakouts that the Turtle system traded actually *failed*. Price would spike above the 20-day high, trigger Turtle buy orders, then immediately reverse—trapping the breakout traders.

Raschke realized these failed breakouts were predictable and tradeable. She developed the **Turtle Soup** strategy, which does the *exact opposite* of the original Turtle system:

> *"Instead of buying the breakout, we wait for it to fail—then fade it."*

The name "Turtle Soup" is a clever play on words: the strategy essentially "eats" the Turtles by trading against them when their breakouts fail.

#### Original Turtle Soup Rules:
- **Setup:** Price makes a new 20-day high (or low)
- **Qualifier:** The previous 20-day high must be at least 3-4 days old (not a fresh breakout)
- **Entry Trigger:** Price reverses back inside the channel (failed breakout)
- **Entry:** Go SHORT (against the failed breakout above), or LONG (against the failed breakdown below)
- **Philosophy:** Mean-reversion—fade false breakouts and profit from trapped traders

#### Turtle Soup Plus One Variant:
Raschke also developed a more conservative variant called "Turtle Soup Plus One" which waits for the *next bar* after the breakout to confirm the failure before entering. This reduces false signals but may miss some opportunities.

---

## Our Enhanced Turtle Soup Strategy

We have taken the classic Turtle Soup concept and enhanced it with modern technical indicators and filters to improve signal quality and adapt to today's markets.

### Core Logic Preserved

The fundamental strategy remains true to Raschke's original concept:

| Turtle (Original) | Turtle Soup (Our Strategy) |
|-------------------|---------------------------|
| BUY breakout above 20-day high | SHORT when that breakout FAILS |
| SELL breakout below 20-day low | LONG when that breakdown FAILS |
| Trend-following | Mean-reversion |
| "The trend is your friend" | "Failed breakouts trap traders" |

---

### Enhancements & Improvements

#### 1. RSI Exhaustion Filter
**Addition:** RSI must confirm exhaustion before entry
- **For SHORT entries:** RSI > 60 (buyers exhausted)
- **For LONG entries:** RSI < 40 (sellers exhausted)

**Why:** The original Turtle Soup had no momentum filter. Adding RSI ensures we only fade breakouts when the market is showing signs of exhaustion, significantly reducing false signals. This enhancement was inspired by later traders who found RSI extremes (originally 90/10, softened to 60/40) dramatically improved win rates.

#### 2. ADX Trending Filter
**Addition:** ADX must be > 20 for trades to execute

**Why:** While the original Turtle Soup was designed for ranging markets, we found that requiring *some* trend strength (ADX > 20) actually improves results. This ensures we're trading in markets with enough directional movement to create meaningful failed breakouts, rather than random noise in dead markets.

#### 3. Heikin Ashi Smoothing
**Addition:** Optional Heikin Ashi calculations for breakout detection

**Why:** Heikin Ashi candles smooth out price noise and make trend reversals more visible. When enabled, the strategy uses HA values to detect breakouts and failures, reducing whipsaws from erratic price spikes.

#### 4. Dynamic Donchian Channels with Regime Detection
**Addition:** Color-coded channels based on market regime
- 🟢 **Green:** Bullish regime (uptrend + DI+ > DI- + OBV bullish)
- 🔴 **Red:** Bearish regime (downtrend + DI- > DI+ + OBV bearish)
- 🟡 **Yellow:** Neutral regime

**Why:** Visual regime detection helps traders understand the broader market context. The original Turtle Soup had no regime awareness—our enhancement lets traders see at a glance whether conditions favor the strategy.

#### 5. Volume Spike Detection (Optional)
**Addition:** Optional filter requiring volume surge on the breakout bar

**Why:** Failed breakouts are more significant when they occur on high volume. A volume spike on the breakout bar (default 1.2x average) indicates more traders got trapped, creating stronger reversal potential.

#### 6. ATR-Based Stops and Targets
**Addition:** Configurable ATR-based stop losses and profit targets
- **Stop Loss:** 1.5x ATR (default)
- **Profit Target:** 2.0x ATR (default)

**Why:** The original Turtle Soup used fixed stop placement. ATR-based stops adapt to current volatility, providing tighter stops in calm markets and wider stops in volatile conditions.

#### 7. Signal Cooldown
**Addition:** Minimum bars between trades (default 5)

**Why:** Prevents overtrading during choppy conditions where multiple failed breakouts might occur in quick succession.

#### 8. Real-Time Info Panel
**Addition:** Comprehensive dashboard showing:
- Current regime (Bullish/Bearish/Neutral)
- RSI value and zone
- ADX value and trending status
- Breakout status
- Bars since last high/low
- Current setup status
- Position status

**Why:** Gives traders instant visibility into all strategy conditions without needing to check multiple indicators.

---

## Entry Rules Summary

### SHORT Entry (Fading Failed Breakout Above)
1. ✅ Price breaks ABOVE the 20-period Donchian high
2. ✅ Previous 20-period high was at least 1 bar ago
3. ✅ Price closes back BELOW the Donchian high (failed breakout)
4. ✅ RSI > 60 (exhausted buyers)
5. ✅ ADX > 20 (trending market)
6. ✅ Cooldown period met
→ **Enter SHORT**, betting the breakout will fail

### LONG Entry (Fading Failed Breakdown Below)
1. ✅ Price breaks BELOW the 20-period Donchian low
2. ✅ Previous 20-period low was at least 1 bar ago
3. ✅ Price closes back ABOVE the Donchian low (failed breakdown)
4. ✅ RSI < 40 (exhausted sellers)
5. ✅ ADX > 20 (trending market)
6. ✅ Cooldown period met
→ **Enter LONG**, betting the breakdown will fail

---

## Exit Rules

1. **ATR Stop Loss:** Position closed if price moves 1.5x ATR against entry
2. **ATR Profit Target:** Position closed if price moves 2.0x ATR in favor
3. **Channel Exit:** Position closed if price breaks the exit channel in the opposite direction
4. **Mid-Channel Exit:** Position closed if price returns to channel midpoint

---

## Best Market Conditions

The Turtle Soup strategy performs best when:
- ✅ Markets are prone to false breakouts
- ✅ Volatility is moderate (not too low, not extreme)
- ✅ Price is oscillating within a broader range
- ✅ There are clear support/resistance levels

The strategy may struggle when:
- ❌ Strong trends persist (breakouts follow through)
- ❌ Volatility is extremely low (no meaningful breakouts)
- ❌ Markets are in news-driven directional moves

---

## Default Settings

| Parameter | Default | Description |
|-----------|---------|-------------|
| Lookback Period | 20 | Donchian channel period |
| Min Bars Since Extreme | 1 | Bars since last high/low |
| RSI Length | 14 | RSI calculation period |
| RSI Short Level | 60 | RSI must be above this for shorts |
| RSI Long Level | 40 | RSI must be below this for longs |
| ADX Length | 14 | ADX calculation period |
| ADX Threshold | 20 | Minimum ADX for trades |
| ATR Period | 20 | ATR calculation period |
| ATR Stop Multiplier | 1.5 | Stop loss distance in ATR |
| ATR Target Multiplier | 2.0 | Profit target distance in ATR |
| Cooldown Period | 5 | Minimum bars between trades |
| Volume Multiplier | 1.2 | Volume spike threshold |

---

## Philosophy

> *"The Turtle system made millions by following breakouts. The Turtle Soup strategy makes money when those breakouts fail. In trading, there's always someone on the other side of the trade—this strategy profits by being the smart money that fades the trapped breakout traders."*

The beauty of the Turtle Soup strategy is its elegant simplicity: it exploits a known, repeatable pattern (failed breakouts) while using modern filters (RSI, ADX) to improve timing and reduce false signals.

---

## Credits

- **Original Turtle System:** Richard Dennis & William Eckhardt (1983)
- **Turtle Soup Strategy:** Linda Bradford Raschke & Larry Connors (1990s)
- **RSI Enhancement:** Various traders who discovered RSI extremes improve reversal detection
- **This Implementation:** Enhanced with Heikin Ashi smoothing, regime detection, ADX filtering, and comprehensive visualization

---

*"We're not following the turtles—we're making soup out of them."* 🥣

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。