Port of the Pine Script v6 “StdDev of VWAP/MA” indicator: rolling-VWAP moving averages, z-scored deviations, per-timeframe linear-regression deviation channels, SMA-smoothed ±2σ bounds — with S&P 500 candles (ES futures on 4H by default, or the ^GSPC cash index) and a TradingView-style “Displaced MAs” overlay above, plus a cooldown gauge below that counts days since the plotted deviation last broke a lower band
Days since the plotted deviation crossed below a lower band
Methodology
This page replicates the TradingView Pine Script v6 indicator StdDev of VWAP/MA (“The Dumpometer”, overlay=false) with the settings of the author’s copy, applied to the S&P 500 index (^GSPC). Unlike the crypto original the asset does not trade 24/7, so the indicator’s “Asset Trades 24/7” setting is off and every bar is a regular-session bar: 09:30–16:00 New York, Monday to Friday, with overnight, weekend and holiday gaps left as gaps (no synthetic bars are inserted). Volume is required by this indicator — the moving averages are rolling VWAPs, so each bar is weighted by its traded volume — and ^GSPC carries the consolidated share volume that makes that possible. Top pane: S&P 500 candles (red/green, TradingView style). Middle pane: the indicator’s deviation channel. Bottom pane: the cooldown gauge.
1 · Moving averages & volatility
Price source = low. Six moving averages are computed as Rolling VWAPs of length 30 / 50 / 110 / 125 / 190 / 265 bars (Extra-Short / Short / Medium / Long / Extra-Long / Extremely-Long). Volatility per length = population standard deviation of the source over the same window.
2 · Deviations
Each series is z-scored: dev = (source − MA) / volatility.
3 · Deviation channels
On every deviation series a channel is drawn with a timeframe-dependent calculation length (1h = 800, 4h = 250, 1d = 1500, 1w = 208 bars): centre = linear regression of the deviation, width = ±2.2 × standard deviation (the author’s Upper Band StdDev Multiplier), and all three lines are then smoothed over 155 bars with an SMA (the “shock absorber”, length and type from the author’s copy). The six deviations are averaged into a Composite that gets the same channel (red upper / green lower bounds). Two extra lower bounds are drawn at composite−1 (navy) and composite−2 (orange); like the author’s copy they are visible by default on every timeframe and can be toggled in the legend.
4 · Deviation lines per timeframe
1h → Medium (aqua) · 4h → Extremely-Long (lime) · 1d → Extra-Long (orange) · 1w → Short (maroon). Every series can be toggled in the legend.
5 · Price levels, volatility rating & volume
The info cards show, for the timeframe-selected length: its current MA, the Composite ULR/LLR in std units, and price levels = MA + channel × volatility (UP / LP / LP2 / LP3). Volatility Rating = standard deviation of daily log returns over the last 255 sessions (one trading year), annualised (√252) and expressed in “V” units; Daily Vol = the same 255-session realised daily volatility in %. Volume shows the latest bar’s volume against its own 20-bar average, because volume is what the rolling VWAPs weight by.
6 · Displaced MAs overlay
The top pane also hosts a port of the TradingView Pine Script v6 indicator Displaced MAs (overlay). It draws the selected moving average (default: Smoothed VWAP, WMA-smoothed) in fuchsia, twelve pairs of percentage-displaced bands around it (2–70%), sigma bands computed from higher timeframes (default: weekly σ×2 around an SMA 20 — lower band only; 4h σ×2 — upper/lower; daily hidden), an optional separate Combined MA, and three optional extra moving averages. Every input (global displacement scale, band smoothing, per-timeframe lookbacks, band multipliers and colours, sigma timeframes, extra MAs) is editable through the ⚙ Displaced MAs settings button in the toolbar, and any line can be toggled in the small legend above the candles. Defaults follow the Pine script: global scale 1.0, symbol scale 1.0 (index), band smoothing off, percentage labels off. Settings are remembered per browser and are stored separately from the Bitcoin page.
7 · Days since lower-band cross (bottom gauge)
The third pane is a cooldown gauge for the deviation line the indicator actually plots on the selected timeframe (ELT on 4H, XLT on 1D, MT on 1H, ST on 1W — the lime/aqua line shown by default, per section 4). On every bar it plots how many calendar days have passed since that line last crossed down through any of the lower bands drawn on the middle pane — the Composite Lower Bound (the ±2.2σ channel floor, green) and its two offsets at −1 (navy) and −2 (orange). The gauge resets to 0 on the bar of the cross; because the three bands sit 1 σ apart, a decline that steps through the deeper bands also resets it, so the reading is the time since the most recent fresh band break by the plotted line. A long rising ramp therefore means “the plotted deviation has not broken a lower band for N days”, while a small number means the break has just happened. The series being tracked is named in the pane label, the legend, the tooltip and the info card, and it re-bases automatically when you switch timeframe. Values are calendar days (fractional on intraday timeframes), computed on the full timeframe history and re-sliced as you pan and zoom, so all three panes always share one X axis.
Provenance
Computations are an in-page JavaScript port of the indicator’s Pine Script v6 source with the author’s settings (ELT = 265; Upper Band StdDev Multiplier = 2.2; band smoothing = SMA 155; 255-session volatility lookback).
4H data source. The 4H pane can be drawn from either of two series, selected with the “4H data” buttons. The page opens on ES futures, because the cash index simply cannot supply much 4H history:
ES futures (ES=F, the default) trade about 23 hours a day, so the provider’s 730-day intraday window yields 4,177 four-hour bars (about 3,600 after session bucketing); the channel’s first bar falls in October 2024, with 2,931 bars carrying a band.
S&P 500 index (^GSPC) uses 6.5-hour sessions, which yield only about 2 four-hour bars per day — roughly 1,451 bars across the same window, so its channel only begins in February 2025.
The futures view carries three caveats that the index view does not: ES is the futures contract rather than the cash index, so levels differ by the basis; the continuous front-month series rolls quarterly (Mar/Jun/Sep/Dec), which introduces small overnight price gaps that are artefacts rather than market moves and can trip a band cross; and its volume is contract count, not consolidated share volume, so the rolling VWAPs are weighted differently. The index series remains the canonical one — use it when contract rolls or basis would distort the reading — and the choice affects the 4H pane only. The pane label and status line always name the series in use.
Data is S&P 500 (^GSPC) OHLCV from the Yahoo Finance chart API, served by spx-dumpometer-data.php (cached server-side, refreshed every 4 hours) — the index itself rather than an ETF proxy, so no split or dividend adjustment is involved and one continuous history feeds every timeframe. Daily and weekly bars run back to 1950 (19,300+ sessions, ~4,000 weeks). Intraday history is capped by the provider at the last 730 days — a hard limit shared by every free keyless source (Yahoo refuses an earlier start for every intraday interval, and Stooq, Alpha Vantage, Twelve Data, Polygon and Finnhub all require keys or block automated access) — so the 1H and 4H panes cover roughly the last two years; the 4H bars are aggregated from the hourly series per session (09:30 and 13:30 New York). Because a session is 6.5 hours rather than 24, the index is closed about three quarters of the time: a 250-bar 4H window covers roughly half a year here, not the 0.5 years the same count would span on a 24/7 asset. The 1h and 4h calculation lengths are deliberately kept at the widest value that still preserves the full visible gauge history (4h 250, 1h 800) — a longer window pushes the channel’s first bar later, and since the cooldown gauge can only begin after the plotted line’s first band cross, widening further would shrink the very history the gauge pane shows (measured: 4h n=250 leaves ~765 gauge bars, n=350 leaves only 266). The 1d and 1w windows are far wider than the original’s 750/104 because daily history runs back decades. Yahoo leaves the opening hourly bar’s volume at 0 on some days: that bar still contributes price, it simply carries no VWAP weight. The page opens on the 4H pane and the default view window is chosen per timeframe so the band is always on screen. Timeframe selection is remembered in the URL hash. This is a technical study, not investment advice.