PROTECTED SOURCE SCRIPT

Turtle Body Setup by TradeTech Analysis

60
Overview

Turtle Body Setup is a minimalist, rules-based pattern detector built around a simple idea: a sequence of shrinking candle bodies (compression) often precedes a directional expansion (breakout). The script identifies those compression phases and then flags the first candle whose body expands significantly beyond the recent average, with polarity taken from the candle’s direction.

This is not a mash-up of many public indicators. It focuses on one original micro-structure concept: strict body-contraction → body-expansion. The logic is fully described below so traders and moderators can understand what it does and how to use it.

How it Works
1. Compression detection (body contraction):
• Over a user-defined window Compression Lookback (N), the script counts strictly shrinking candle bodies (|close-open|).
• When the count ≥ Min Shrinking Candles, we mark the market as in compression.
2. Expansion / Breakout qualification:
• Compute avgBody = SMA(body, N).
• A candle is a breakout when current body > avgBody × Breakout Body Multiplier.
• Polarity: green (close>open) → Bullish breakout; red (close<open) → Bearish breakout.
3. Signal emission / confirmation:
• By default, signals are confirmed on bar close to avoid intrabar flicker (Confirm Signals on Bar Close).
• If you prefer intrabar responsiveness, you can disable it (understand that shapes/alerts may update until the bar closes).

Why this is Useful

Many tools look at ranges or volatility bands; Turtle Body focuses purely on body geometry as a proxy for crowd hesitation (contracting bodies) followed by commitment bursts (a disproportionately large body). It’s intentionally minimal to prevent overlap with common mashups (MA/RSI/BB/Wavetrend). The value is in the transparent, explainable pattern definition and high signal legibility.

Signals & Visuals
BUY shape below bar: bullish expansion after a valid compression.
SELL shape above bar: bearish expansion after a valid compression.
• Optional shaded background during compression and a small orange dot at compression start to help visually segment phases.
• A lightweight dashboard tracks counts (bullish, bearish, compression zones, bars since last signal).

Inputs
• Compression Lookback: window for both contraction check and average body.
• Min Shrinking Candles: minimum strictly shrinking bodies required to qualify as compression.
• Breakout Body Multiplier: how big the current body must be vs the average to count as a breakout.
• Confirm on Close: toggle to emit signals only once the bar has closed (recommended).
• Show Signals / Shade Compression / Show Dashboard: visual controls.

How to Use
1. Apply to your desired timeframe.
2. Start with defaults (N=5, Min=3, Multiplier=1.8).
3. Look for compression → breakout sequences aligning with your market bias or higher-timeframe context.
4. Combine with risk management (structure, stop placement, position sizing). This script only detects a micro-structure pattern; it is not a complete trading system.

Best Practices
• Use higher timeframe bias (trend, S/R) to filter signals.
• Tighten or loosen Breakout Body Multiplier to adapt to instrument volatility.
• Keep Confirm on Close = ON if you want non-repainting shapes/alerts.

Alerts

Two alert conditions are included:
• Turtle Body — Bullish Breakout
• Turtle Body — Bearish Breakout
Create alerts from the “Alerts” panel and choose the condition you want.

Limitations & Notes
• This is an educational tool that highlights a price-action pattern. It does not claim performance and does not provide financial advice.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.