SMB "Fashionably Late Scalp" (9 EMA × VWAP) — backtest & study tool
WHAT THIS IS
An open, fully tunable Pine v5 strategy implementation of the "Fashionably Late
Scalp," a 9-EMA-crosses-VWAP intraday setup published by SMB Capital. It is built
for honest backtesting and study of the setup's mechanics — not as a turnkey
profitable system (see "Honest notes on performance" below).
THE SETUP (long; short is the mirror)
1. Divergence — a sustained move separates the 9 EMA from the session VWAP.
2. The Turn — price puts in a distinct low of the day, then starts back up.
3. Convergence — the 9 EMA rises back and crosses VWAP. That cross is the trigger.
Entry: an up-sloping 9 EMA crossing a flat-to-downsloping VWAP (mirror for shorts).
Stop: 1/3 of the distance from VWAP to the low of day.
Target: a measured move — low-of-day to the cross, projected the same distance
beyond the cross.
TWO ENTRY MODES
• Anticipate cross (stop order) [default]: TradingView can normally only act on the
bar AFTER a cross. Because the EMA's next value is deterministic in price
(EMA_next = α·P + (1−α)·EMA_now), the script solves for the exact price P that
makes the 9 EMA meet VWAP and rests a stop order there — so it fills AT the cross,
intrabar. Non-repainting: the trigger is fixed on the closed bar and refreshed
each bar.
• React next bar open (market): conventional market entry on the confirmed cross
(fills one candle late). Kept for A/B comparison.
Note: the anticipatory trigger sits above VWAP by ~4× the EMA-to-VWAP gap (9-EMA
algebra), so the further the EMA lags VWAP at entry, the higher the fill and the
lower the realized reward:risk. A "Minimum reward:risk" input — measured from the
actual fill, not from VWAP — bounds this.
KEY INPUTS
• EMA length; separate EMA & VWAP slope lookbacks/thresholds (VWAP uses a longer
lookback so "flat-to-downsloping" reflects the day's posture, not a 1-bar wiggle)
• Stop fraction, stop-anchor mode, cross-price mode, minimum reward:risk
• "The turn" requirement, re-entry cooldown, long/short toggles
• Optional filters: ideal EST session windows (10:00–10:45 / 10:46–13:30), a
>15-minute EMA-flat veto, and a volume-confirmation filter
• A signal-funnel table (top-right) showing how many crosses survive each gate, so
you can see exactly what is or isn't triggering
REQUIREMENTS & BEHAVIOR
• Needs a volume-bearing instrument (stocks/futures). On symbols without real
volume the session VWAP is undefined and the script stops with a message.
• Session VWAP and the low/high of day share one daily anchor, so they reset
together across RTH/ETH/24h charts.
• Signals evaluate on closed bars; no lookahead. Set realistic commission and
slippage in the Strategy Properties before drawing any conclusions.
HONEST NOTES ON PERFORMANCE
The source cites roughly a 60% win rate at ~3:1 reward:risk. Those numbers come
from a discretionary playbook, and in my own testing this mechanical version does
NOT reproduce them — it is not reliably profitable out of the box. That is
expected: the original depends on trader judgment this code cannot encode
(selecting "in-play" names, reading the speed/quality of the turn, position sizing,
skipping messy tape), and scalping costs erode a thin edge quickly. Treat this as a
faithful study/backtest harness for the mechanics and a base to experiment on — not
a signal to trade live. Nothing here is financial advice; test and manage your own
risk.
CREDITS
Setup concept: SMB Capital ("The Fashionably Late Scalp," public cheat sheet).
Pine v5 implementation, the anticipatory-cross entry, and the diagnostics are mine.
No comments:
Post a Comment