Adaptive Mean + σ VWAP Fade [Shannon] — v6.0

A clean-slate mean-reversion indicator gated by Brian Shannon's multi-timeframe MA alignment. Buy near VWAP when the MAs stack up, sell near VWAP when they stack down, take profits at ±2σ.
§0 — TL;DR (for a 12-year-old)

What this thing does, in plain English

Imagine a stock's price is a rubber band stretched around an invisible middle line. During the day, that middle line is called VWAP — it's what the "average person" paid for the stock so far today. Sometimes price stretches too far up or too far down from the middle. When it does, it usually snaps back.

This indicator watches for that stretch-and-snap. It says:

  1. "Only trade when the bigger picture agrees." That's the Shannon MA stack — a set of moving averages that has to be stacked like a staircase, either all going up (bullish) or all going down (bearish).
  2. "Only buy when price is close to the middle line" (VWAP), because that's fair value — you're not chasing.
  3. "Take profits at the far edges." Once price stretches to 2 standard deviations (2σ) away, it's very likely to snap back. You harvest.
  4. "Don't be greedy — take profits in pieces." First a 30% chunk at the halfway extreme (1σ), then a 50% chunk at the full extreme (2σ), and let the last 20% ride until the middle line breaks.
  5. "Don't trade the opening hour." The math needs about 60 minutes of data to know what "far" even means.

That's it. One trade type. Long or short. Same rules mirrored.

§1

Objective

Prove or disprove a single edge: mean-reversion trades entered near VWAP and exited at ±2σ, filtered by Shannon's linear MA alignment, produce positive expectancy (ExpR > 0) with acceptable win rate.

Everything else — the tables, the tooltips, the webhook — is machinery in service of measuring that one edge. If ExpR is positive across ≥ 30 trades on multiple symbols and timeframes, we scale. If not, we go back to the drawing board.

§2

What you see on the chart

The bands (from center out)

Line / zoneMeaningColor
Basis (thick purple)Session VWAP under 30m; 5-DMA between 30m and daily; 20-DMA on daily+Purple
±0.5σ shadingEntry zone. When close is inside this band AND alignment agrees → fire.Faint gray fill
±1σ lineTier 1 target (30% off here if aligned in the trade direction)Blue
Fair-value cloud (±1σ)The "normal range." Price spends most of the session here.Faint green fill
±2σ lineTier 2 target (50% off) AND stop (opposite side)Red
Extended zones (+1σ→+2σ, -1σ→-2σ)Statistically stretched — reversion likelyFaint red fill

The Shannon MA rainbow

LineRoleColor
SHORT MAFastest reference — tells you the immediate trendYellow
INTERMEDIATE MARunner exit trigger (close crosses back through)Orange
LONG MAUnderlying-trend anchorRed
CONFIRMATION MABig-picture context (only on some timeframes)Purple

Trade markers

§3

The one trade — MR L and MR S

There is exactly one setup class. Long and short are mirrors of each other.

MR L (long)MR S (short)
Trend gateAlignment = UPAlignment = DOWN
Entry zoneclose ∈ [basis − 0.5σ, basis + 0.5σ]close ∈ [basis − 0.5σ, basis + 0.5σ]
Entry priceclose of the qualifying barclose of the qualifying bar
Tier 1 target (30%)basis + 1σbasis − 1σ
Tier 2 target (50%)basis + 2σbasis − 2σ
Runner (20%)close crosses back below INTERMEDIATE MAclose crosses back above INTERMEDIATE MA
Stop (all remaining)basis − 2σbasis + 2σ
Time exit26 bars in trade (default)26 bars in trade

Sizing: shares = floor(risk$ / |entry − stop|). Default risk is $100/trade. Whole position taken at entry; the tier structure just controls WHEN pieces come off.

Why "near VWAP" and "target ±2σ"? Statistical fact: on most stocks intraday, the price spends ~70% of bars within ±1σ and ~95% within ±2σ. So when price tags ±2σ, the odds of a mean-revert bounce are high (though never guaranteed). Buying near the middle gives the trade room to breathe.
§4

Tiered exits — 30 / 50 / 20

Why partial exits instead of one big target?

How the final R is calculated

Total R = weighted sum of each tier's R at its exit:

R_total = 0.30 × R@T1 + 0.50 × R@T2 + 0.20 × R@runner_exit
        (if a tier didn't hit, its portion contributes at the stop or time-exit price)

Example — perfect run: T1 hits (+0.5R at T1), T2 hits (+1.0R at T2), runner exits at +1.5R (INT MA cross above). Total R = 0.30 × 0.5 + 0.50 × 1.0 + 0.20 × 1.5 = 0.15 + 0.50 + 0.30 = +0.95R. Beats a single-exit +1R by nothing much on this run, but the tier structure protected against pull-backs.

Example — stopped after Tier 1: T1 hit (+0.30 × 0.5 = +0.15R banked), then price reversed and hit the stop. Remaining 70% × (−1R) = −0.70R. Total = +0.15 − 0.70 = −0.55R. Compare to a single-exit trade in the same scenario: full stop = −1R. Tier structure reduced the loss by 45%.

§5

Shannon MA framework — auto by chart TF

Brian Shannon's Fig. 10.4 table: different timeframes get different MA lengths. This indicator picks them automatically based on the chart you have open.

Chart TFSHORTINTERMEDIATELONGCONFIRMATION
1 min50100—VWAP
2 min2050100—
5 min40100200—
10 min2050100195 (5 DMA equiv)
30 min7173365 (5 DMA)
Daily102050200
Weekly102040—

The "runner exit" always uses the INTERMEDIATE MA — on the 30-minute chart, that's the 17 EMA. On the 2-minute chart, it's 50. On 5-min, 100. Universal rule: the mid-tier MA on whatever chart you're looking at.

If you want to override the auto-selection, uncheck Auto-select MA lengths by chart TF and set the manual values.

§6

Alignment — the linear stack

Shannon's rule for a "clean" trend: every MA is stacked in the right order AND every MA is sloping the right way.

Three modes, easiest to hardest. Default is Loose — a good starting point.

Loose (default)

Just the ORDER has to be right. Think of the MAs like runners in a race: for an UP signal you just need them in the correct finishing order — SHORT ahead of INTERMEDIATE ahead of LONG ahead of CONFIRMATION. Doesn't matter if they're all still accelerating or some are slowing down; if the order is right, alignment is UP. Mirror for DOWN.

Trades fire earlier this way, because the fast MA can flip position before the slow ones have finished turning. More trades, more chances at edge, but also more false starts.

Strict

The toughest mode. Everything Loose requires PLUS every MA has to be sloping the correct direction (rising for UP, falling for DOWN) compared to 3 bars ago.

Like a marching band that has to be in the right lines AND all stepping in sync. Fewest trades. Only the cleanest trends survive. Good for filtering out trend-transition chop.

Rainbow (score-based)

In between. Each of the 4 MAs earns 1 point when TWO things are true at the same time: (a) price is on the correct side of it, AND (b) that MA is sloping the correct direction. Add up the points across 4 MAs — max is 4.

Trade fires when the score is at least N (default 3 of 4). Set N=4 for the same effect as Strict; set N=1 to be super loose. This is the "tuning" mode — for when you know Strict is too tight and Loose is too permissive, and you want to dial in the middle exactly.

NEUTRAL — what happens when nothing lines up

If neither UP nor DOWN conditions are met, alignment is NEUTRAL and no trade fires. Chart shows "NEUTRAL" in the status table's Alignment row.

§7

Warm-up — no signals before 10:30 AM

Why the first hour is dangerous: Session VWAP σ builds from zero every 9:30. In the first 5-10 bars, σ is measured in pennies — ±1σ can be $0.05 wide, ±2σ maybe $0.15. Any tiny move triggers a "target" or "stop" in that range. The trade math is meaningless.

Default vwapWarmMin = 60 — no signals until 60 minutes into the RTH session (10:30 AM). By that point σ has stabilized enough for the ±1σ / ±2σ bands to represent real edges.

The setting is TF-independent: on 2m that's 30 bars, on 5m it's 12 bars, on 30m it's 2 bars. You get 60 real-clock minutes regardless of resolution.

You can lower or raise this in inputs; a value of 0 turns off warm-up entirely (not recommended for VWAP-basis modes).

§8

Every input, explained

Basis + σ bands

InputDefaultPurpose
BasisAuto (by TF)Which mean to use. Auto picks session VWAP under 30m, 5-DMA at 30m-<1D, 20-DMA on daily+.
VWAP sourceohlc4Which price to weight into VWAP. OHLC4 is Shannon's default.
Warm-up minutes60Signal lockout after session open (see §7).
Inner mult0.5Entry-zone half-width in σ.
Mid mult1.0±1σ band = Tier 1 target.
Outer mult2.0±2σ band = Tier 2 target AND stop.
Show ±0.5σ / ±1σ / ±2σall onDraw those bands on the chart.

Shannon MA framework

InputDefaultPurpose
Auto-select MA by TFonUse Fig. 10.4 lookups (recommended).
Manual: SHORT / INT / LONG / CONF20 / 50 / 100 / 200Only used when Auto is off.
MA typeEMAEMA or SMA. EMA more responsive; SMA smoother.
Slope lookback3 barsHow far back to compare for "is this MA rising?"
Plot MAsonDraw the rainbow.

Alignment gate

InputDefaultPurpose
Require alignmentonOFF = MR fires purely on entry-zone hits (no trend filter).
StrictnessStrictSee §6 — strict / loose / rainbow.
Rainbow: min points3Threshold when Rainbow mode is picked.

Trade

InputDefaultPurpose
Entry zone (×σ)0.5Half-width of the entry band around basis.
Target (×σ)2.0Tier 2 (main) target multiplier.
Stop (×σ)2.0Stop = opposite side of basis at this multiplier.
Tiered exitonOFF reverts to single-exit at target.
Tier 1 fraction0.30% of position taken at Tier 1.
Tier 2 fraction0.50% at Tier 2. Runner = 100 − T1 − T2 (default 20%).
Tier 1 target (×σ)1.0Where Tier 1 partial fires.
One position at a timeonBlock new signals while a trade is open.
Max bars in trade26Time-based auto-flat.
Cooldown bars0Bars to wait after an exit before allowing next signal.
Streak pause0 (off)Pause direction after N stops. 0 = no pause.
Early cover VWAPoffON = exit if price crosses back through basis before tiers complete.

Risk / size

InputDefaultPurpose
Risk mode$Fixed dollars or % of account.
Risk per trade ($)100Dollar risk in $-mode.
Account $ (for % mode)25000Base for %-mode sizing.
Risk % per trade0.5%-mode risk. e.g. 25000 × 0.5% = $125 risk.
Min / max shares1 / 5000Sanity caps.

Display

InputDefaultPurpose
Big trade markersonHuge labels + faint trade-active tint.
Label / table sizeNormal / SmallElement sizing.
Show status tableonTop-right diagnostic panel.
Show EDGE tableonBottom-right per-signal expectancy panel.
Detailed tooltipsonOFF = one-line tooltips instead of expanded.

Webhook / DB emission

InputDefaultPurpose
Send ENTRY/EXIT via alert()offFires TradingView alerts you can wire to a webhook.
Log JSON to Pine logonCopy-paste from Pine log console for offline analysis.
Indicator tag / Engine versionVWAP_FADE / v6.0.0Written into every emitted JSON so downstream can filter.
Trade ID prefixVFPrefix on generated trade IDs.
§9

Reading the two tables

Status table (top-right)

RowWhat it means
VWAP FADE v6.0.0 · session VWAPHeader — which basis type is active.
BasisCurrent basis price.
σCurrent standard deviation (in price units). Small = bands tight.
Alignment · UP/DN/NEUTRAL (n/4)Current MA-stack state and its score.
MA lengthsSHORT / INT / LONG / CONF in play for this chart's TF.
Entry zoneLow / high bounds of the entry band + IN/out flag.
TradeCurrent position: LONG @ X / SHORT @ X / flat.
Stop / TgtActive stop and target when in trade.
Risk$ risk on next / current trade and share count.
Streak L / SConsecutive stopouts per direction.
MR L: fire?✓ or ✗ (reason). Reason is the FIRST gate blocking, in this order: warmup → align → not in zone → slot → streak.
MR S: fire?Same, for the short side.

EDGE table (bottom-right)

ColMeaning
SIGNALSetup name (MR L / MR S / ALL / $ TOTAL).
NTrade count.
W-L-TWins / Losses / Timeouts + breakeven. Classified by R sign (see below).
Win%W / N.
TotRSum of R over all trades. Green if positive, red if negative.
ExpRThe number that matters. TotR / N. Positive with N ≥ 20 = real edge.
How R is classified with tiered exits: W if final R > +0.05, L if R < −0.05, T otherwise. So a stopped-out trade that already took Tier 1 partial can still classify as W if the banked profit outweighed the residual stop loss.
§10

Debug — why isn't it firing?

Look at the MR L: fire? and MR S: fire? rows in the status table. The parenthesized reason is the first blocking gate. Common ones:

Reason shownWhat it meansHow to fix (if you want)
warmupLess than vwapWarmMin minutes into sessionWait, or lower Warm-up minutes (not recommended)
align (need UP)MA stack isn't in the required alignmentTry Loose or Rainbow mode, or turn off Require alignment
not in ±0.5σ zonePrice is outside the entry band right nowWait for a pullback to VWAP, or widen Entry zone (× σ)
slotA trade is already open (one at a time)Wait for the current trade to exit
streakDirection paused after N stopsWait for a winner, new day, or set Streak pause to 0
Don't blindly loosen gates. Every one exists to protect you from a specific losing pattern. If a gate is preventing entries you disagree with, log the trades that WOULD have fired and check their R over 30+ occurrences before flipping the gate. Data, not opinion.
§11

FAQ

Why is this so different from v5.10?

v5.10 had 11 setup classes (CONT, EXP, VWAP L, PULLBK, BACKSIDE, BASE BRK, and their shorts). Trying to prove edge across 11 setups × dozens of gates = never getting a statistically meaningful sample on any of them. v6.0 collapses to ONE setup class, one thesis, so we can actually measure whether it works. The vaulted v5.10 file is preserved for compare-and-contrast.

Can I still use the σ v5.10 "compression → expansion" trade?

Yes — load the vaulted file: Adaptive_Mean_Std_Dev_Bnads_V5.10-vault-20260919-214304.txt. Runs alongside v6.0 as a separate indicator instance.

Does the runner really wait for the INTERMEDIATE MA cross?

Yes. On a 30-min chart, that's the 17 EMA. On 2m, the 50 EMA. The runner is designed to hold as long as the trend has any legs — MA cross is the definition of "trend is now broken."

What if σ is still too tight after 60 minutes?

Then the trade will fire but the R units will be small. You may want to combine with an ATR floor (not currently implemented in v6.0; roadmap has it as an optional safety belt).

Where do trade events go for grading?

Turn on Send ENTRY/EXIT via alert(), create one TradingView alert on "Any alert() function call" for this indicator, and point the webhook at tradingview_smb_indicator_trigger.php. That writes into alerts_tradingview.indicator_alerts. From there the accountability HUD grading pipeline (Phase 1 in the roadmap) can compare real fills to what the indicator suggested.

How do I know if this actually has edge?

Watch the EDGE table's ExpR column over 30+ trades on multiple symbols and timeframes. Positive ExpR at N ≥ 30 across at least 3 different stocks on 2 different TFs = the edge is real. Anything less is just noise.


Generated 2026-09-19 · v6.0.0 · one thesis, tested honestly.