S3.1 SFP EMA Turtle Strategy for Hyperliquid [HYPR-run]Building block #3 in the strategy series. The complete priority chain
with all five slots filled: three entry systems, pyramid scaling,
4-mode ATR trailing exits, smart stops, and failsafe stop. This is the
fully-assembled version of the S1.1/S2.1 template.
Uses the same ATR trailing module as ATR Trailing with all
four architectures, separate long/short lookbacks (default 14/26), and
separate multipliers. The indicator runs standalone for alerts; this
strategy embeds it as the exit engine with a minimum-bars-in-trade
guard to prevent premature exits on pyramids.
Smart stops detect when a trade has moved against you beyond a threshold
AND broken the entry bar's structure. This catches failing trades
earlier than a trailing stop or fixed percentage. The SFP detector runs
three lookback configurations simultaneously (5/2, 5/5, 13/3) and
requires full bar confirmation plus wick validation.
ATR MODES
A3.1: LinReg + plain ATR, no ratchet. The baseline. Linear regression
projects where price is heading, plain ATR sets the distance. Stop
moves freely in both directions.
A4.0: LinReg + VWATR + Efficiency Ratio + ratchet (default). Volume-
weighted ATR discounts low-liquidity candles. The Efficiency Ratio
(Kaufman) measures trend quality: in a clean trend it widens the stop;
in chop it tightens. Ratchet floor means the stop only moves in your
favor.
A4.1: Chandelier + VWATR + ratchet + first-bar multiplier. Anchored to
the highest high (longs) or lowest low (shorts). First-bar multiplier
sets a tighter initial stop, then the standard multiplier takes over.
A4.2: LinReg + VWATR, no ratchet. Same as A4.0 without ratchet floor
or Efficiency Ratio. Stop moves freely with the projection.
FEATURES
- Swing Failure Pattern (SFP) entries with multi-lookback detection
- EMA crossover entries: four configurable pairs
- Turtle breakout entries with volume/body confirmation
- Smart stops: swing structure invalidation + P&L threshold
- Four ATR trailing architectures selectable via dropdown
- Volume-weighted ATR: low-liquidity candles contribute less
- Efficiency Ratio: tightens in chop, widens in trend (A4.0)
- Ratchet floor: stop only moves in your favor (A4.0, A4.1)
- First-bar multiplier for tighter initial protection (A4.1)
- Separate ATR lookbacks for longs (14) and shorts (26)
- Separate multipliers for longs and shorts
- Pyramid entries on 5-bar extremes
- SFP nullification: active SFP candles block opposing entries
- Wick nullification: 38.2%+ wicks block entries
- Market structure labels (HH, LH, HL, LL)
- Bot Mode for lighter live calculation
- Failsafe percentage stop as absolute floor
- Late entry ATR window (reference lines around entry price)
BUILDING BLOCK SERIES
S1.1: EMA crossover entries + priority chain template
S2.1: adds Turtle breakout entries + ATR trailing exits + pyramids
S3.1 (this): adds Swing Failure Pattern entries + smart stops + 4-mode
ATR trailing module
The three strategies show progressive refinement of the same
architecture. S1.1 teaches the structure; S2.1 adds exit management;
S3.1 adds early-exit intelligence and the full ATR module. Each is
usable on its own.
HOW TO USE WITH WEBHOOKS
1. Add to chart, enable one or more strategy toggles (XO/XU, Turtle, SFP)
2. Configure ATR mode, multipliers, and smart stop threshold
3. Create a TradingView alert, trigger: "Order fills only"
4. Check "Webhook URL" and paste your webhook endpoint
5. Paste the JSON snippet into the Message box
6. Set expiration to Open-ended, create
STRUCTURE
Signals > Entry Gates > Trade Engine (if/else priority chain)
1. Primary entries (EMA crossover, Turtle breakout, SFP)
2. Pyramid entries (5-bar extremes)
3. Trailing exits (4-mode ATR module)
4. Smart stops (swing structure + P&L threshold)
5. Failsafe stop (percentage floor)
CREDITS
ATR: J. Welles Wilder (1978)
Efficiency Ratio: Perry Kaufman
Pine Script® strategy






















