Rolling VWAP with SignalsRolling VWAP with Signals
Overview
Rolling VWAP with Signals plots a time-window ("rolling") VWAP with standard deviation bands, and generates filtered buy/sell signals on band breakouts. Unlike a session VWAP, which resets at a fixed anchor such as the start of day or week, this VWAP recalculates continuously over a trailing window that you define, for example the last 10 hours or the last 2 minutes of 3-minute bars. This keeps it adapting on any chart, in any session, in any market, including markets that trade around the clock.
This script is an original extension built on the rolling VWAP concept from Rolling VWAP . It adds standard deviation bands, trend-state coloring, crossover based buy/sell signals, an ATR rising filter, and a VWAP trend-alignment filter, none of which are present in the original.
How It Works
The rolling VWAP is computed by summing price times volume and volume over a trailing time window, then dividing, the standard VWAP formula applied to a moving window instead of a fixed session. The calculation runs on an independent timeframe set by the RVWAP Timeframe input, evaluated with request.security().
Standard deviation bands sit above and below the VWAP at a configurable multiple of the rolling standard deviation, computed with the direct weighted squared deviation method rather than the E minus E ^2 shortcut, which avoids precision loss on high-priced instruments.
smoothedATR = ta.swma(ta.atr(atrLength))
atrRising = not useATRFilter or smoothedATR > smoothedATR
Trend state is bullish when the VWAP is higher than it was one higher-timeframe bar ago and price is above the upper band, and bearish under the mirrored condition. The VWAP line is colored accordingly.
Buy and sell signals fire once, on the bar where price crosses a band, not on every bar price remains outside it:
Buy — close crosses over the upper band
Sell — close crosses under the lower band
Two optional filters narrow signals to higher-conviction setups:
Rising ATR — requires an SWMA-smoothed ATR to be higher than the prior bar, filtering out breakouts occurring while volatility is contracting
RVWAP trend alignment — requires the bullish or bearish trend state described above, so buy only fires in an established uptrend and sell only in an established downtrend
Four alert conditions are available: price above the upper band, price below the lower band, a buy signal, and a sell signal.
Inputs
RVWAP Timeframe — Timeframe the rolling VWAP and standard deviation calculation runs on, independent of the chart timeframe. Default: 1 minute.
RVWAP Time Period (Hours / Minutes) — Length of the trailing window used for the rolling calculation. Shorter windows track faster; longer windows behave more like a session VWAP. Default: 0 hours, 1 minute.
Standard Deviation Multiplier — Distance of the bands from the VWAP, in standard deviations. Lower values give tighter bands and more signals; higher values give wider bands and fewer, stronger signals. Default: 1.618.
Show Standard Deviation Bands — Toggles the band plots and disables buy/sell signals when off, since signals require a band cross. Default: on.
Show Fill Between Bands — Toggles the shaded fill between the upper and lower bands. Default: on.
Smooth VWAP/StdDev — Applies additional smoothing to the VWAP and standard deviation lines for a less-lagged appearance when off, or a smoother, laggier line when on. Default: off.
Require Rising ATR for Signals — Gates buy and sell signals on a rising smoothed ATR. Default: on.
Length — ATR length used by the rising-ATR filter. Default: 14.
Require RVWAP Trend Alignment for Signals — Gates buy signals on a bullish RVWAP trend and sell signals on a bearish RVWAP trend. Default: on.
Upper Band, Lower Band, Fill — Colors for the band lines and the fill between them.
Usage Notes
Requires a data feed that provides volume; the script raises a runtime error if none is available.
The rolling calculation needs a minimum of 10 bars within the window to produce a value; very short windows on sparse data may show gaps.
Rising ATR means the current SWMA-smoothed ATR value is strictly greater than the previous bar's value, a one-bar comparison rather than a multi-bar slope.
Values inside the current, still-forming RVWAP Timeframe bar can update intrabar, as with any request.security() call without a fixed historical offset. Confirmed bars do not repaint.
Disable both signal filters to see every raw band-crossing signal, or enable them independently to trade off signal frequency against signal quality.
Credits
Rolling VWAP methodology adapted from the original Rolling VWAP .
Uses the open-source PineCoders ConditionalAverages library for the windowed total calculations.
Disclaimer
This script is provided for educational and informational purposes only and does not constitute financial advice. Past performance is not indicative of future results. Always do your own research and apply proper risk management before trading.
Indicator

SEB-Dual-time-period EMA smoothing standard error band-zrbb-1. Gauging Trend Strength
The width of Standard Error Bands directly reflects the health of a trend:
Contracting Bands: When price is trending and the Standard Error Bands continue to narrow, it indicates that price is closely following the regression trendline, suggesting strong trend momentum and a likely continuation in the same direction.
Expanding Bands: When the Standard Error Bands begin to expand, it means price is deviating further from the regression trendline, signaling that the trend may be nearing its end and the market could enter consolidation or reverse.
2. Identifying Low-Volatility Conditions and Breakout Precursors
Similar to the "Squeeze" logic of Bollinger Bands, when Standard Error Bands narrow significantly, it often foreshadows an imminent expansion in volatility. Traders can treat this as an early warning signal for a potential breakout or the start of a significant price move.
3. Warning of Trend Reversals and Consolidation
The expansion of Standard Error Bands itself does not directly provide buy or sell signals, but it offers a statistical indication of trend exhaustion:
Band Expansion → Decreasing "cohesion" of the existing trend
Combined with price patterns, volume, or other momentum indicators (such as RSI, MACD), it can help determine whether a reversal or sideways consolidation is likely.
4. Comparative Application with Other Channel Indicators
Within the technical analysis framework, Standard Error Bands are often used in conjunction with Bollinger Bands, Keltner Channels, Donchian Channels, and others. Compared to Bollinger Bands, which are more sensitive to short-term price spikes, Standard Error Bands—being based on linear regression—provide a more robust depiction of trend direction and tend to generate fewer false signals in clearly trending markets.
1. 判断趋势强度
标准误差带的宽窄变化直接反映趋势的健康程度:
带收窄(Contracting):当价格处于趋势中,而标准误差带持续收窄,说明价格紧密跟随回归趋势线,趋势动能较强,可能继续沿原方向运行。
带扩张(Expanding):当标准误差带开始扩张,意味着价格偏离回归趋势线的程度加大,趋势可能即将结束,市场可能进入盘整或发生反转。
2. 识别低波动与突破前兆
与布林带的"挤压"(Squeeze)逻辑类似,标准误差带在极度收窄时,往往预示着波动性即将放大。交易者可将其视为潜在突破或大幅行情启动的早期预警信号。
3. 趋势反转与盘整预警
标准误差带扩张本身并不直接给出买卖方向,但它提供了一个趋势衰竭的统计信号:
带扩张 → 原有趋势的"凝聚力"下降
结合价格形态、成交量或其他动量指标(如 RSI、MACD),可辅助判断是反转还是横盘整理
4. 与其他通道指标的对比应用
在技术分析体系中,标准误差带常与布林带、凯尔特纳通道(Keltner Channels)、唐奇安通道(Donchian Channels)等配合使用。相比布林带对短期价格尖峰更敏感,标准误差带由于基于线性回归,对趋势方向的刻画更为稳健,在趋势明确的市场中假信号相对较少。
Indicator

Leverage MALeverage MA (Moving Average Deviation & Volatility Bands)
Overview
Leverage MA measures how far price has stretched away from a chosen Moving Average, expressed either as a raw point difference or a percentage distance. By tracking extreme deviations using Standard Deviation and historical pivot levels, it helps identify overextended market conditions, potential mean-reversion setups, and trend strength.
Key Features
1. Multi-MA Support: Choose from 5 different moving average types (EMA, SMA, WMA, VWMA, HMA) to fit your trading style and timeframe.
2. Flexible Calculation Modes:
Percentage: Displays distance as a percentage of the MA—ideal for comparing assets or high-volatility instruments.
Spread: Displays raw distance in points/ticks—ideal for fixed-pip or price-unit analysis.
3. Dynamic Standard Deviation Color Coding: The histogram automatically changes color based on standard deviation thresholds ($2.0\sigma$, $3.0\sigma$, $3.5\sigma$, $4.0\sigma$) to highlight statistical extremes at a glance.
4. Historic Highs & Lows (Pivot Tracking): Automatically marks local peak deviations (pivot highs and lows) directly above and below the histogram columns to give immediate visual reference for historic extreme levels.
5. Real-time Status Label: Displays the current distance value off to the right edge of your chart for quick scanning.
How to Use
1. Spotting Mean Reversion: When histogram bars turn Red / Dark Red (crossing above $3.5\sigma$ or $4.0\sigma$), price is statistically overextended relative to the moving average. These zones often signal exhaustion or higher probability pullback setups.
2. Key Support/Resistance Deviation: Use the historical pivot labels (red text above and below the columns) to see past swing extremes where price previously bounced or reversed.
3. Trend Strength: Stable, moderate cyan histogram values indicate steady trend momentum without dangerous over-expansion.
Inputs & Customization
1. Source & Length: Select your price source (Close, High, Low, etc.) and MA lookback period.
2. StdDev Settings: Customize color schemes for different standard deviation tiers ($2\sigma$ up to $4\sigma$) and choose whether to color your main price chart candles based on volatility steps.
3. Historic Levels: Toggle historical high/low pivot labels on/off and adjust the pivot lookback period to suit your timeframe.
Indicator

AM TBR - NQ Stats## Summary
Credit. All historical statistics shown by this indicator are transcribed from the AM TBR study published by NQ Stats — a 10-year analysis of 2,572 NQ sessions (2016–2026). The research design and data analysis are entirely their work; this script is an independent live reconstruction of that methodology
AM TBR anchors a Time-Based Range at the 08:00 New York open, projects ±0.25 standard-deviation levels from that open using a rolling 20-day sample standard deviation of prior session % net changes, and tracks a single, well-defined statistical event in real time: does price touch either level, and if so, does it revert to the TBR Open before 12:00 New York?
Once a touch occurs, the indicator overlays historical context for that exact situation — reversion probability conditional on the hour of the touch, typical adverse excursion (MAE) zones, continuation (MFE) targets after reversion, and time-based cumulative milestones — so you can see at a glance whether the current session is behaving like a typical reverting session or drifting into historically non-reverting territory.
This is a statistical study tool, not a trading system. It does not generate buy/sell signals and makes no claims about future performance.
## What the indicator draws on the chart
At 08:00 New York every weekday the script anchors the TBR Open (drawn as a dashed line extended to 12:00), the two ±0.25σ touch levels, and an optional faint σ ladder at ±0.5 / 0.75 / 1.0 / 1.5 / 2.0 for scale. A light background tint marks the active 08:00–12:00 window.
On the first touch of either level, a marker stamps the exact time (resolved to the minute via lower-timeframe data where available) and shaded MAE zones appear on the touched side. These zones are anchored at the TBR Open — not at the touch level — matching the source study's measurement convention. Reading them from the open outward: the grey zone (TYPICAL) ends at the historical median MAE of sessions that went on to revert; blue (DEEP) ends at the reverted P75; orange (STRETCHED) at the reverted P90; red (RISK) at the median MAE of sessions that never reverted; and the dark zone (NON-REV) extends to the non-reverted P75. The practical reading: while price holds inside grey/blue, the session is taking normal heat for an eventual reversion; pushing through orange into red means the extension now looks more like the historical failures than the historical successes.
If price reverts to the TBR Open before 12:00, the target label flips to REVERTED with the time, and three dotted MFE lines appear on the far side of the open at the historical median (green), P75 (yellow), and P90 (orange) continuation distances — how far past the open reverting sessions historically travelled. At 12:00 the session settles as Reverted, No Reversion, or No Touch.
## Reading the dashboard, row by row
**σ (20d sample).** The rolling standard deviation currently in force, shown both as a percentage and converted to points (e.g. "1.55% ≈ 450.50"). The points figure is your conversion key for every σ value in the table: multiply any σ number by it to get a price distance. A 0.445σ median MAE with σ ≈ 450 points means roughly 200 points of adverse excursion from the open.
**TBR Open (08:00).** The anchor price. Every level, zone, and statistic is measured from here.
**First Touch.** Which level was hit first, the exact time, and the hour band it falls into (08:xx, 09:xx, 10:xx, or 11:xx). The band drives everything below it, because the source study's strongest finding is that reversion odds depend heavily on when the first touch happens.
**Band Reversion Rate.** The historical percentage of sessions with a same-side touch in the same hour band that reverted to the open before 12:00, with its sample size. Colour reflects strength: green at 75%+ (08:xx touches), teal 65–75% (09:xx), orange 45–65%, red below. A ⚠ marks bands where the historical sample is tiny (10:xx and 11:xx, with 48 and 11 touches respectively across ten years) — treat those rates as directional at best.
**Outcome.** The live state machine: Waiting (levels drawn, no touch), Touched — Pending, Reverted ✓ with the reversion time, No Reversion ✗, or No Touch.
**MAE (σ from open).** Your session's maximum adverse extension so far, in σ units measured from the TBR Open, with a context tag comparing it against the reverted-MAE distribution for your band: "≤ p50" means the current heat is smaller than the median reverting session took; "p50–p75" and "p75–p90" mean progressively deeper but still within the range most reverting sessions survived; "> p90 ⚠" means the extension now exceeds nine in ten historical reversions; "≥ non-rev p50 ⚠" means it has reached territory more typical of sessions that never came back. The background shifts green → orange → red accordingly. This row is the single fastest health-check in the table.
## The stat block in depth
The dark header names the exact historical slice being displayed — for example "+0.25 · 08:xx — |σ| FROM TBR OPEN" means every number below describes sessions where +0.25 was touched first during the 08:00 hour, with all distances in σ units from the TBR Open. Signs follow the study's convention: for a +0.25 touch, MAE values print positive (heat is above the open) and MFE prints negative (continuation is below the open); for a −0.25 touch the signs flip.
Each row shows n, Mean, Median, P75, and P90 of a distribution:
**MAE Rev** — adverse excursion of sessions that ultimately reverted. This is the "survivable heat" distribution and the source of the grey/blue/orange zone boundaries. Median well below mean tells you the distribution is right-skewed: most reverting sessions took modest heat, a minority took a lot.
**MAE N-Rev** — maximum extension of sessions that never reverted by 12:00. Compare its median against the MAE-Rev P90: the gap between them is the discrimination region. For 08:xx +0.25 touches, reverting sessions' P90 heat was about 0.96σ while non-reverting sessions' median run was about 1.53σ — extensions between those two values are where the historical populations genuinely separate.
**MFE** — how far beyond the TBR Open reverting sessions continued after reverting. These are the three dotted target lines on the chart. The n here equals the reverted count, since only reverting sessions have an MFE. The large gap between median and P90 (0.69σ vs 1.99σ for 8am +0.25 touches) says continuation is occasionally explosive but usually moderate — which is why the lines are labelled as escalating reference distances rather than a single target.
To convert any cell to points, multiply by the σ-in-points figure from the top of the table.
## The cumulative section
**By 09:00 / 10:00 / 11:00 / 12:00** rows show the source study's cumulative reversion distribution: the percentage of all touched sessions (same side) that had already reverted by that clock time. These figures rise by construction — they are a running total of reversion times, ending at the overall band rate. When your touch is in the 08:xx band, the 8am-focus curve is used (27.9 → 68.2 → 76.1 → 78.4% for +0.25); otherwise the all-sessions curve applies. The Clock column counts down to each checkpoint and to the 12:00 Hard Stop.
Interpreting these correctly matters: a rising cumulative number is not "the odds are improving." The useful live question is conditional — if the session is still pending at a checkpoint, the chance of reverting before 12:00 equals (Final − Cum) ÷ (100 − Cum). Worked from the all-sessions +0.25 curve: still pending at 09:00 leaves roughly a 69% chance of reverting by noon; still pending at 10:00, about 34%; still pending at 11:00, about 10%. The longer a touched session goes without resolving, the more it historically resembles the sessions that never resolved.
## Inputs reference
**Setup group.** *SDEV Lookback* (default 20) sets how many completed daily sessions feed the standard deviation; 20 matches the source study, and changing it moves the levels while decoupling them from the reference statistics. *Touch Level (σ)* (default 0.25) sets the projected level distance — the levels will draw correctly at any value, but all displayed probabilities and distributions were generated for ±0.25 specifically and no longer describe other settings. *TBR Colour* and *Label Size* control appearance. *Keep previous sessions on chart* retains prior sessions' drawings instead of clearing at each new 08:00, useful for visually reviewing recent history (drawings beyond PulseWire's object limits are recycled oldest-first).
**Levels group.** *Show σ Ladder* toggles the ±0.5–2.0σ reference lines and *Ladder Colour* styles them. *Show MAE Zones after touch* toggles the shaded zone map; *Zone Labels* independently toggles the text tags on those zones, worth switching off on busy charts. *Show MFE Targets after reversion* toggles the three continuation lines.
**Dashboard group.** *Show Dashboard* toggles the table; *Show Cumulative Milestones* toggles its bottom section if you prefer a shorter table; *Position* and *Text Size* place and scale it.
**Alerts.** Two alert conditions are provided — "Level Touched" and "Reverted to Open." Create them from the standard alert dialog by selecting this indicator and the desired condition; "Once Per Bar" is the natural frequency for both.
## How the statistics were generated (methodology and source)
The probabilities and distribution values displayed by this indicator are **not computed from your chart**. They are transcribed reference statistics from an independently published, publicly available 10-year statistical study of NASDAQ-100 E-mini futures (NQ) covering 2016–2026 (published by NQ Stats). That study's methodology, which this indicator reproduces live:
- **2,572 total sessions** analysed; **2,545 touched** a ±0.25σ level within the window (1,252 touched +0.25 first, 1,293 touched −0.25 first).
- **σ definition:** rolling 20-day *sample* standard deviation of prior session % net changes; the level is projected as TBR Open × (1 ± 0.25 × σ/100).
- **Window:** 08:00–12:00 New York time; a session "reverts" if price returns to the TBR Open after the touch and before 12:00.
- **Headline rates:** 74.0% of +0.25 touches and 74.6% of −0.25 touches reverted, strongly conditional on touch hour: roughly 79% for 08:xx, 69.5% for 09:xx, 39.6% for 10:xx, 9.1% for 11:xx.
- **MAE and MFE** are measured in |σ| units from the TBR Open. Where the study published no distribution rows for a band (MFE for 10/11:xx touches; MAE for 11:xx), the nearest earlier band's values are substituted and documented in the code.
**What is computed live from your chart:** the σ value, the TBR Open, all level and zone prices, touch and reversion detection and timing, and the running MAE. The geometry is yours; the probabilities are the study's, projected onto your chart's coordinates.
## Detection details
On chart timeframes of 1 minute and above, 1-minute intrabar data timestamps the first touch to the exact minute and sequences same-bar events correctly, so a pre-touch dip to the open is never miscounted as a reversion. Where 1-minute history is unavailable (deep chart history), detection falls back to chart-bar resolution with a documented tiebreak. Reversion means trading at or through the TBR Open price.
## Recommended use
NQ / MNQ futures (the reference statistics are NQ-specific; other symbols will run but the statistics will not apply), on 1–15 minute timeframes that divide evenly into an hour so the 08:00 anchor aligns exactly. The most robust historical context comes from 08:xx touches (n ≈ 1,500); late-morning touches carry small samples and wide uncertainty.
## Limitations and honest caveats
Historical frequencies are not probabilities of future outcomes; regimes drift. The live σ may differ slightly from the study's around continuous-contract roll dates, since roll adjustments perturb close-to-close % changes — statistics are σ-relative so behavioural context transfers, but exact prices may differ marginally from the original research. Sub-minute event ordering is unknowable at any bar resolution, and MAE on the reversion bar can be slightly overstated when the adverse extreme printed after the open-cross within the same bar; the underlying 1-minute study shares the same granularity limits. Source values were transcribed from the published tables and not independently re-derived; one internal inconsistency in the source (a single P90 cell differing between two of its tables) is documented in the code with the more internally consistent value chosen.
This indicator is for educational and analytical purposes only and is not financial advice.
---
*Open-source under the Mozilla Public License 2.0. The statistical reference values are transcribed from publicly published research as described above; the live reconstruction, detection engine, and visualisation are original work.* Indicator

VWAP Suite | Trend & Mean Reversion with Adaptive FiltersOverview
This strategy is built around a custom volume-weighted average price (VWAP) engine with standard-deviation bands, and gives you two complete, independently-tuned trading modes in a single script:
Trend Following — trades breakouts/crossovers in the direction of VWAP's own momentum
Mean Reversion — trades stretched price extremes back toward VWAP, filtered for low-trend conditions
Rather than assuming one style of market behavior, this script lets you choose the mode that matches what you're trading — a trending momentum stock, or a calmer range-bound one — and includes a layered filter system designed to keep you out of low-quality setups in either mode.
How VWAP Is Calculated
VWAP weights price by the volume traded at that price, rather than treating all price ticks equally — so it reflects where the real trading activity concentrated, not just a simple average.
This script computes it manually (not via a black-box built-in), which allows for flexible anchoring:
Session — resets daily (best for lower timeframes, intraday charts)
Week — resets weekly (better for 1H–4H charts)
Month — resets monthly (for swing/position-style testing)
Standard deviation bands are plotted at three levels (1, 2, and 3 std dev by default), giving visual reference points for "normal," "stretched," and "extreme" price deviation from the volume-weighted average.
Strategy Modes
Trend Following
Looks for price to break through VWAP (or an outer band) in a direction confirmed by VWAP's own slope — the idea being that VWAP acting as support/resistance and trending in your trade's direction adds conviction to the move.
Three selectable entry triggers: VWAP Cross, Band 1 Break, Band 2 Break
VWAP slope filter (with adjustable lookback and minimum slope %) to avoid trading flat/directionless VWAP
Take-profit targets at the opposite band or at VWAP itself
Best suited for: momentum-driven, higher-volatility names where trends persist once established.
Mean Reversion
Looks for price to overextend beyond a chosen band, then trades the snap-back toward VWAP. Includes an ADX filter to specifically avoid taking reversion trades during strongly trending conditions (where "buying the dip" or "fading the rip" is historically much riskier).
Three selectable entry triggers: Outside Band, Band Cross, Band Reclaim (wick-and-recover confirmation — the most conservative/false-signal-resistant option)
ADX filter caps entries below a configurable trend-strength threshold
Maximum VWAP deviation cap (in ATR units) to avoid catching a falling knife on extreme extensions
Best suited for: range-bound, lower-volatility names where price oscillates predictably around a stable average.
Filter System (False-Signal Reduction)
Every entry — in either mode — passes through a shared base filter layer before mode-specific logic is applied:
Volume Filter: Requires volume above a multiple of its recent average, filtering out low-conviction moves
Volatility (ATR) Filter: Requires a minimum ATR (as % of price) to avoid dead, directionless conditions
Band Width Filter: Avoids trading when bands are unusually tight (a sign of indecision and high whipsaw risk)
VWAP Slope Filter (Trend mode): Confirms VWAP itself is moving meaningfully in the trade direction, not just flat
ADX Filter (Mean Reversion mode): Blocks entries when the broader trend is too strong to safely fade
Each filter can be toggled independently, so you can isolate which conditions matter most for the instrument and timeframe you're trading.
Optional Confluence Layer
A secondary indicator can be layered on top of either mode:
RSI — for trend mode, confirms momentum direction; for mean reversion, confirms oversold/overbought exhaustion via a crossover trigger
EMA Regime (200-period default) — acts as a higher-level trend filter, only allowing longs above the EMA and shorts below it
Risk Management
Risk-based position sizing — position size is calculated from your risk % input divided by stop distance, not a fixed share count
Maximum position size cap (% of equity) — acts as a hard ceiling so tight-stop trades can't produce oversized positions
Two stop-loss methods — ATR-multiple based, or band-based (using the outer bands as structural stop references)
Two take-profit methods — opposite band target, or VWAP itself
Optional fixed take-profit lock — freezes the target price at entry rather than letting it drift with VWAP
Optional break-even stop — moves the stop to entry once a configurable ATR-multiple of profit is reached
Visuals
VWAP line color-shifts between two colors depending on whether price is above or below it
Three-tier shaded band system for at-a-glance visual reference of price deviation
Entry markers (triangle up/down) plotted directly on signal bars
Background shading during filtered/no-trade conditions, so you can visually see why the strategy stayed flat
Important Notes Before Use
Match your anchor period to your timeframe. Session anchoring is built for intraday charts; on higher timeframes (2H+), Week or Month anchoring will produce more reliable slope readings, since Session resets can occur every few bars and distort trend measurement.
Backtest results include commission assumptions but not slippage — adjust the commission/slippage settings in the strategy properties to reflect your actual broker before drawing conclusions from performance metrics.
This script is provided for research and educational purposes. Past performance in backtesting does not guarantee future results. Always forward-test on a paper account before committing real capital. Strategy

Systematic Deviation HarvesterThe Systematic Deviation Harvester is a structural asset accumulation engine designed to exploit extreme peak-to-trough price dislocations. Instead of relying on mathematical oscillators or moving averages, this strategy isolates pure structural alpha by measuring real-time percentage contractions from a rolling annual high-water mark.
Operating strictly on a daily resolution, the system treats deep market corrections as mathematical discounts, mechanically scaling into assets during cascading sell-offs and liquidating the aggregate basket via a unified trailing profit target.
🏛️ Core Algorithmic Pillars
1. Trailing High-Water Mark Engine
The system maintains a rolling, state-retaining benchmark of the asset's structural peak.
- Annual Anchor: At the open of the first trading bar of each calendar year, the benchmark resets to prevent structural anchoring bias.
- Peak Registration: If the market prints a higher high during the year, the benchmark dynamically adjusts to the new ceiling, resetting the downside calculation logic.
2. Asymmetric Scale-In Matrix
When market panic drives price away from the annual ceiling, the engine deploys capital across two independent structural tiers. While the strategy permits position stacking over time, an internal state machine prevents over-exposure or execution spam:
- Alpha 1 Allocation (Minor Drop): Triggers an initial capital deployment (e.g., 5% of account equity) when price crosses the secondary correction threshold.
- Alpha 2 Allocation (Major Drop): Triggers a heavier, secondary capital deployment (e.g., 10% of account equity) only if a systemic liquidation cascades into deep discount territory.
3. State Interlocks & Re-Armament Handlers
To prevent the engine from repeatedly buying into a declining market on consecutive bars, the strategy utilizes strict execution flags (minor_triggered and major_triggered). Once a tier is filled, it is locked. The engine governs its multi-cycle stacking through two user-selectable reset rules:
- Clean Slate Mode (Standard): Entry flags remain completely locked until a trailing exit is achieved and total position exposure reads exactly zero. Once flat, the entry flags clear for a fresh cycle.
- Rally Reset Mode (Optional): Clears the entry locks mid-cycle if the market stages a significant recovery rally from its local bottom (e.g., drawdown shrinks back to 1%). This allows the engine to unlock the entry tiers and stack new positions if the market rolls over again before hitting a full profit take.
4. The Omega Master Exit
Position liquidation is never managed on an individual trade level. Instead, the strategy treats the compounded portfolio as a unified basket:
- Composite Average Price Tracker: The engine continuously tracks the volume-weighted average cost base across all active scale-in tiers.
- Tick-Precision Trailing Stop: Once the market rallies past a specified percentage above the composite average cost, the engine activates a trailing stop. It converts percentage parameters into discrete price ticks (syminfo.mintick) to trail the macro-recovery, capturing maximum extension while protecting capital against sudden re-tests of the lows.
⚙️ Interface Parameters & Customization
- Drawdown Thresholds: User-definable percentage boundaries for minor/major entry triggers and recovery reset thresholds.
- True Compounding Sizing: Dynamic capital sizing that computes exact share counts based on real-time equity fluctuations rather than static cash values.
- Unified Compounding Exit: Custom configurations for trailing activation thresholds and peak-to-exit retraction steps.
🚀 Setup & Deployment Guide
1. Timeframe Selection: Open a clean chart and explicitly set the resolution to Daily (1D).
2. Apply Engine: Add the script to your chart. The baseline metrics are pre-configured for broad market index equity tracking.
3. Calibrate Thresholds: Open the inputs settings panel. For high-volatility large-caps, expand the Minor Drop and Major Drop fields proportionally to accommodate wider structural swings.
4. Select Risk Profile: Choose your exposure rule. Toggle Enable Rally Reset Rule ON for aggressive, high-frequency compounding, or leave it OFF for conservative, single-cycle wave trading.
📊 Methodological Constraints (Read Before Backtesting)
- Timeframe Enforced: Designed and structurally locked to the Daily (1D) interval. Intraday testing will render calculation flags inactive.
- Backtest Fidelity: Built using process_orders_on_close = true. This prevents the "look-ahead" backtesting bias common in default script architectures by ensuring orders are strictly filled at the confirmed closing print of a daily candle.
🏁
The Systematic Deviation Harvester is engineered strictly for high-conviction, structural bull-market assets that exhibit long-term macro growth profiles. Because the architecture relies entirely on scaling into deep price contractions relative to annual benchmarks, its structural alpha depends heavily on the underlying asset eventually recovering and charting new highs. It should be deployed exclusively on resilient, secularly expanding markets, such as major index ETFs or high-conviction large-cap equities, where deep corrections represent clear mathematical discounts rather than terminal structural decay. Strategy

Indicator

Indicator

Kalman Trailing Stop (KTS)█ OVERVIEW
The Kalman Trailing Stop (KTS) is an advanced, math-driven trend-following system designed to keep you in winning trades longer while dynamically filtering out market noise.
Instead of relying on static moving averages or basic ATR multipliers, KTS utilizes a 2D Kalman Filter combined with Statistical Digital Signal Processing (DSP) and Williams Market Structure. It adapts to volatility and volume in real-time, effectively distinguishing between genuine trend shifts and temporary liquidity sweeps.
█ CORE MECHANICS
1. 2D Kalman Adaptive Trailing Stop
At the heart of the indicator is a robust 2D Kalman filter that tracks both price level and velocity.
Volume-Weighted Variance: The trailing stop becomes highly responsive during high-volume pushes (high trust) and flattens out during low-volume consolidation (low trust), preventing premature stop-outs.
Sigmoid Smoothing & Structural Anchoring: Instead of jagged, abrupt jumps, the stop uses sigmoid transitions to smoothly glide to new structural floors/ceilings derived from recent Intermediate-Term Highs and Lows (ITH/ITL).
Slope Confirmation: The trailing stop will only flip its directional bias if the underlying Kalman baseline slope confirms the reversal, neutralizing fake-outs.
2. Statistical Plunger Logic (Liquidity Sweeps)
Markets frequently sweep liquidity beyond technical levels before reversing. The "Plunger" logic mathematically identifies these traps.
Dynamic Sweep Multiplier: By tracking the kurtosis (fat-tail distribution) of price returns, the script dynamically expands its sweep threshold during periods of wild volatility.
Wick Filtering: It detects deep wicks that pierce the Kalman bands and close strongly back within the bar's range, highlighting statistically validated exhaustion points.
3. Algorithmic Pyramiding & Volatility Warnings
Scale-In Detection: KTS monitors volume footprints to identify safe zones to add to your position. It looks for a sequence of volume "dry-up" during a pullback, followed by a volume-backed breakout past recent market structure.
Livermore Ejector Concept: The indicator flags abnormal, massive range expansions that occur against the prevailing trend, acting as an early warning system for sudden momentum shifts.
4. Built-in Risk & Performance Engine
Dynamic Position Sizing: Automatically calculates raw position and pyramid sizes based on your account equity, risk percentage, and maximum leverage.
Live Performance Dashboard: A built-in HUD tracks both the Global and Recent Profit Factor (PF) of the main trend signals, alongside the real-time distance to your trailing stop.
█ VISUAL GUIDE
Colored Gradient Band: The main Kalman Trailing Stop. Green indicates an active long trend; Red indicates an active short trend.
Large Diamonds (♦️): Main Trend Entries. Triggered when price breaks the Kalman Stop with slope confirmation.
Small Triangles (🔼/🔽): Bullish and Bearish Plunger signals. These indicate deep liquidity sweeps and wick rejections at statistical extremes.
Small Crosses (➕): Algorithmic Pyramid signals. Opportunities to scale into the current trend based on volume dry-ups and structural breakouts.
Yellow X-Crosses (❌): Abnormal Reaction Warnings. Signals a massive volatility spike moving against your active position.
█ SETTINGS
Kalman Trailing Stop Settings
Kalman Responsiveness: Adjusts how quickly the system reacts to price changes (1-100).
Trailing Stop Distance (SD): Sets the baseline width of the trailing stop from the Kalman-smoothed price, measured in standard deviations of the True Range. A higher value (e.g., 3.0) gives the trade more breathing room, while a lower value tightens the stop.
Disclaimer
This script is designed for educational and informational purposes only. Trading involves significant risk. The built-in performance table is an un-optimized raw calculation and should not be used as a guarantee of future system profitability. Indicator

Indicator

Flipped Inverted Z-Score (Subpane)Flipped Inverted Z-Score (Subpane) Indicator
What It Does
This indicator measures how far an asset's current price deviates from its long-term average, expressed as a Z-Score — a statistical measure of standard deviations from the mean.
The description "flipped inverted" means the score rises when price is above its long-term average (bullish territory) and falls when price is below it (bearish territory), making it intuitive to read at a glance.
The indicator also highlights when an asset is overheated (orange) and when the asset has cooled off significantly (blue). Oftentimes when an asset is overheated investors are taking profit, and when an asset is oversold investors are accumulating. It's important though to note that an asset can be overbought or oversold for a long period of time (or may in fact never return to prior highs or lows). The z-score highlights bright green and bright red at extreme values, further enhancing these overbought and oversold areas.
The indicator occupies a separate subpane below your main chart, so it never clutters your price action.
Core Calculations
Three values drive everything:
1-Year Moving Average (MA) — the long-term baseline representing "fair value"
Standard Deviation Proxy MA — a shorter MA used to normalize the deviation, making the score comparable across different assets and price ranges
Flipped Z-Score — computed as -(1Y MA - Price) / Std Dev MA, so positive = price above fair value, negative = price below
The Z-Score is dimensionless and asset-agnostic, meaning it works equally well on Bitcoin at $100k or a stock at $15. This normalization is the key benefit over a plain moving average crossover indicator.
Visual Elements
Z-Score Line
The main line changes color dynamically:
🟢 Lime — Strongly above threshold (bullish momentum)
🟩 Green — Mildly positive (above zero, below threshold)
🟥 Maroon — Mildly negative (below zero, above threshold)
🔴 Red — Strongly below threshold (bearish momentum)
Slow & Fast Moving Averages of the Z-Score
Two smoothed MAs are overlaid on the Z-Score line itself, helping filter noise and identify trend direction within the indicator. Both turn green above zero and red below zero.
Background Highlighting (Hot/Cold Zones)
An optional orange or blue background appears when conditions align for potentially overbought or oversold readings:
🟠 Orange background — Z-Score is elevated, above both MAs, and exceeds the hot threshold → potential overbought/overheated zone
🔵 Blue background — Z-Score is depressed, below both MAs, and exceeds the cold threshold → potential oversold/undervalued zone
Crossover Dots (Optional Alerts)
Small colored dots mark moments when the Z-Score crosses above or below the Slow MA — useful as entry/exit signal triggers or for setting PulseWire alerts.
Baseline Reference Line
A horizontal line at zero marks the dividing line between price being above or below long-term fair value. (Additional lines can be added to help as references. You may find that certain assets are less volatile, and therefore deviate less from the base reference line. This difference may also occur over time for example in the case of a new asset versus a more mature asset.)
User-Configurable Settings
Setting Default — What It Controls
Price Source (Close) — Which OHLCV value drives the calculation
1-Year MA Period (365 bars) — Long-term "fair value" baseline length
Std Dev Proxy Period (150 bars) — Normalization window, shorter = more sensitive
Z-Score Deviation Threshold (±SD) (0.50) — Where the line color flips from mild to strong
Background Hot Threshold (0.34) — Minimum Z-Score to trigger orange background
Background Cold Threshold (0.40) — Minimum Z-Score depth to trigger blue background
Enable Background Highlighting (On) — Toggle hot/cold background on or off
Show Horizontal Reference Lines (On) — Toggle the zero baseline line
Show Z-Score Moving Averages (On) — Toggle the slow and fast MA lines
Slow MA Period (50 bars) — Smoothing period for the trend-following MA
Fast MA Period (3 bars) — Smoothing period for the responsive MA
Show Crossover Dots (Off) — Toggle the MA crossover signal dots
Practical Use Cases
Macro cycle positioning — on daily/weekly charts with default 365-bar settings, the score gives a birds-eye view of where an asset sits in its broader cycle, useful for sizing positions larger or smaller
Overbought/oversold screening — orange and blue backgrounds highlight historically stretched conditions worth watching for reversals
Trend confirmation — when the Z-Score, Slow MA, and Fast MA are all aligned on the same side of zero, it confirms the broader trend direction
Cross-asset comparison — because the score is normalized, you can apply identical settings to BTC, ETH, SPY, or any stock and compare readings directly
Alert triggers — crossover dots (when enabled) give discrete signal events you can attach PulseWire alerts to, removing the need to watch the chart constantly
Tips for Tuning
Shorter timeframes (1H, 4H): consider reducing the 1-Year MA period and Std Dev period proportionally, and uncomment the threshold lines in the source code for finer visual guidance
More sensitive signals: lower the Fast MA period toward 1–2 and tighten the deviation threshold
Reduce noise: raise the Slow MA period and increase the hot/cold thresholds so backgrounds only appear during truly extreme readings
Indicator

VWAP TrendVWAP Trend & Daily Map Execution by erdensedat
Description:
VWAP Trend is an advanced day-trading engine and market mapping tool designed for intra-day execution using purely objective price action metrics. Instead of relying on lagging oscillators, this indicator fuses VWAP (Volume Weighted Average Price) deviations, Daily Open levels, and an automated Previous Day High/Low (PDH/PDL) targeting system.
Key Features:
Dynamic Bias Engine: The indicator measures real-time alignment between the Daily VWAP and the Daily Open price. A "BULLISH PRESSURE" signal fires when price reclaims both key metrics, while a "BEARISH PRESSURE" signal fires when price breaks below them.
Smart Time Filter: Automatically ignores high-volatility chop during the initial hours of a session (default is set to hide major text signals before 07:00 exchange time).
Automated PDH/PDL Liquidity Targets: Previous Day Highs and Lows are tracked with a "Cut-on-Touch" system. When a signal is active, these levels act as objective take-profit zones. Once touched, the level is cut, and a "TARGET REACHED" label is placed automatically.
Multi-Timeframe Macro Dashboard: An unobtrusive, dark-mode compatible panel displays the macro environment (EMA 200 Main Trend, Weekly Bias, Weekly VWAP, Daily Bias) alongside live target levels.
Clean UI & 'Only Today' Mode: Avoid chart clutter. The indicator features an "Only Today" toggle that completely erases previous days' lines, bands, and signals every day at midnight, leaving you with a perfectly clean chart for the current session.
How to Use:
Observe the Main Dashboard for Macro Alignment (Weekly Bias & EMA 200).
Wait for the designated trading hour to begin (e.g., 07:00).
Look for a Bullish / Bearish Pressure alert (indicated by clean, background-free text and arrow markers).
Target the active PDH or PDL lines shown on the chart.
Alerts:
Includes a single, unified alert condition ("VWAP Trend Signal") that dynamically pushes "Bullish Pressure" or "Bearish Pressure" notification text upon bar close.
Disclaimer:
Disclaimer: The "VWAP Trend" indicator by erdensedat is provided for educational and informational purposes only. It is not financial advice, and you should not construct it as such. Trading in financial markets (including cryptocurrencies, forex, and equities) involves a significant risk of loss and is not suitable for all investors. Past performance of any trading system or methodology is not necessarily indicative of future results. Always conduct your own research and manage your risk. Indicator

Daily Return Z-Score / OutlierDaily Return Z-Score / Outlier
What this indicator does
Daily Return Z-Score / Outlier measures how unusual today's daily return is relative to the instrument's own historical return distribution. It converts the current return into a Z-Score (standard-deviation scale) and colours the bars according to whether the return sits in the normal range, a warning zone, or an extreme zone (fat-tail event).
The goal is to make statistical outliers visible — days on which the price move is materially larger than the recent history would suggest.
How it works
Data basis (daily context): Daily returns are sampled on the daily timeframe ("D") via request.security, independent of the chart timeframe currently displayed. This keeps the statistical reference consistent.
Return calculation: Either simple percentage returns (close − close ) / close or log returns ln(close / close ).
Distribution statistics over a rolling window (default: 252 trading days ≈ 1 year). Two methods are available:
MAD (robust): Median and median absolute deviation. Insensitive to individual extreme values. The Z-Score is computed as 0.6745 · (return − median) / MAD (scaled to the normal distribution).
Classic: Mean and standard deviation. Z = (return − mean) / stdev. More reactive to, and distorted by, extreme values.
Empirical percentiles: In addition to the Z-Score, warning and extreme thresholds are derived directly from the observed percentiles of the return distribution (e.g. 5% / 95% for warning, 1% / 99% for extreme). Bar colour follows these empirical percentiles rather than normality assumptions.
Live return: The running return is computed against yesterday's daily close, so the classification updates intraday as the current day develops.
Display
Histogram of the Z-Score on a common sigma scale.
Reference lines at 0, ±1, ±2 and ±3 sigma for visual orientation.
Live label showing the current Z-Score on the last bar.
Values table (optional, bottom-right) with Z-Score, band classification, selected method, today's return, the dispersion measure (MAD or stdev), warning/extreme thresholds, and the effective sample size.
Colour logic
Normal — return within the warning percentiles.
Warn + / − — return beyond the warning percentile.
EXTREME + / − — return beyond the extreme percentile (fat tail).
Settings
Method: MAD (robust) or Classic (mean/stdev).
Lookback (days): Length of the statistics window (5–1000).
Log returns: Log instead of percentage returns.
Warning percentile % and Extreme percentile %: Colouring thresholds.
Colours for bullish/bearish warning and extreme zones.
Show values table.
Alerts
Extreme outlier UP — daily return beyond the upper extreme percentile.
Extreme outlier DOWN — daily return beyond the lower extreme percentile.
Extreme outlier (both directions) — combined condition.
How to use it
The indicator helps highlight days with a statistically notable move — for example to add context to news days, to watch for volatility clustering, or as a filter alongside an existing strategy. The MAD method is recommended when the history contains isolated strong outliers.
Notes
A Z-Score measures how unusual a move is, not its direction as a forecast.
Significance depends on a sufficiently large sample (see the "Sample" field in the table).
This script is an analysis tool and does not constitute financial advice. Past distributions are no guarantee of future behaviour.
═══════════════════════════════════════
Daily Return Z-Score / Outlier — Deutsch
Was macht dieser Indikator?
Daily Return Z-Score / Outlier misst, wie ungewöhnlich der heutige Tages-Return im Vergleich zur eigenen historischen Verteilung des Wertpapiers ist. Der Indikator wandelt den aktuellen Return in einen Z-Score (Standardabweichungs-Skala) um und färbt die Balken danach ein, ob sich der Return im normalen Bereich, in einer Warn-Zone oder in einer Extrem-Zone (Fat-Tail-Ereignis) befindet.
Ziel ist es, statistische Ausreisser sichtbar zu machen — also Tage, an denen die Kursbewegung deutlich grösser ausfällt, als es die jüngste Historie nahelegt.
Wie es funktioniert
Datenbasis (Daily-Kontext): Über request.security werden die Tages-Returns auf dem Tages-Timeframe ("D") erhoben, unabhängig vom aktuell angezeigten Chart-Timeframe. So bleibt der statistische Bezug konsistent.
Return-Berechnung: Wahlweise einfache prozentuale Returns (close − close ) / close oder Log-Returns ln(close / close ).
Verteilungsstatistik über ein rollierendes Fenster (Standard: 252 Handelstage ≈ 1 Jahr). Zwei Methoden stehen zur Wahl:
MAD (robust): Median und Median-Absolutabweichung. Unempfindlich gegen einzelne Extremwerte. Der Z-Score wird als 0.6745 · (Return − Median) / MAD berechnet (skaliert auf die Normalverteilung).
Klassisch: Mittelwert und Standardabweichung. Z = (Return − Mean) / Stdev. Reagiert stärker auf Extremwerte und wird von diesen verzerrt.
Empirische Perzentile: Zusätzlich zum Z-Score werden Warn- und Extrem-Schwellen direkt aus den beobachteten Perzentilen der Return-Verteilung gebildet (z. B. 5% / 95% für Warnung, 1% / 99% für Extrem). Die Balkenfarbe richtet sich nach diesen empirischen Perzentilen, nicht nach Normalverteilungs-Annahmen.
Live-Return: Der laufende Return wird gegen den gestrigen Tages-Schluss berechnet, sodass die Einordnung schon während des laufenden Tages aktualisiert wird.
Anzeige
Histogramm des Z-Scores auf einer gemeinsamen Sigma-Skala.
Referenzlinien bei 0, ±1, ±2 und ±3 Sigma zur visuellen Orientierung.
Live-Label mit dem aktuellen Z-Score am letzten Balken.
Werte-Tabelle (optional, unten rechts) mit Z-Score, Band-Einstufung, gewählter Methode, heutigem Return, Streuungsmass (MAD bzw. Stdev), Warn-/Extrem-Schwellen sowie der effektiven Stichprobengrösse.
Farb-Logik
Normal — Return innerhalb der Warn-Perzentile.
Warn + / − — Return jenseits des Warn-Perzentils.
EXTREM + / − — Return jenseits des Extrem-Perzentils (Fat Tail).
Einstellungen
Methode: MAD (robust) oder Klassisch (mean/stdev).
Lookback (Tage): Länge des Statistik-Fensters (5–1000).
Log-Returns: Log- statt prozentuale Returns.
Warn-Perzentil % und Extrem-Perzentil %: Schwellen für die Färbung.
Farben für bullische/bärische Warn- und Extrem-Zonen.
Werte-Tabelle anzeigen.
Alerts
Extrem-Ausreisser HOCH — Tagesreturn jenseits des oberen Extrem-Perzentils.
Extrem-Ausreisser RUNTER — Tagesreturn jenseits des unteren Extrem-Perzentils.
Extrem-Ausreisser (beide Richtungen) — kombinierte Bedingung.
Verwendung
Der Indikator eignet sich, um Tage mit statistisch auffälliger Bewegung hervorzuheben — etwa zur Kontext-Einordnung von News-Tagen, zur Beobachtung von Volatilitäts-Clustern oder als Filter neben einer bestehenden Strategie. Die MAD-Methode wird empfohlen, wenn die Historie einzelne starke Ausreisser enthält.
Hinweise
Ein Z-Score misst die Ungewöhnlichkeit einer Bewegung, nicht deren Richtung im Sinne einer Prognose.
Die Aussagekraft hängt von einer ausreichend grossen Stichprobe ab (siehe Feld "Sample" in der Tabelle).
Dieses Skript ist ein Analyse-Werkzeug und stellt keine Anlageberatung dar. Vergangene Verteilungen sind keine Garantie für zukünftiges Verhalten.
Indicator

Indicator

Equilibrium Deviation Engine [LB]
Concept
The Equilibrium Deviation Engine is a session-resetting, volume-weighted equilibrium model that builds a dynamic fair value basis from accumulated price and volume since the last anchor point (daily by default). Around this basis, it constructs multiple deviation bands and an independent extreme contrarian channel whose width varies inversely with short-term volatility — expanding during quiet markets and contracting during turbulent ones.
Mathematical Foundation
At each new session (e.g., daily open), the engine resets three accumulators and recalculates them bar by bar :
PV = SUM(Price * Volume)
V = SUM(Volume)
P2V = SUM(Price^2 * Volume)
The equilibrium basis is the volume-weighted average price since reset :
Basis = PV / V
The standard deviation of price around this basis is derived from the variance :
Var = max( (P2V / V) - Basis^2 , 0 )
Dev = sqrt(Var)
Three main bands are then computed by applying adaptive multipliers to this deviation. The adaptation uses two independent weights :
TWAP Weight — compares the basis to a hidden TWAP. The larger the gap relative to the deviation, the more the bands widen, capturing potential mean-reversion targets.
HV Weight — compares current historical volatility (HV) to its own smoothed baseline. When HV expands, bands widen ; when HV contracts, bands narrow.
The final band width for level k is :
D_k = Dev * Mult_k * TWAP_Weight * HV_Weight
The Extreme Contrarian Channel
A separate channel is built using an inverse volatility weight. Instead of expanding with rising HV, it contracts :
InvWeight = clamp( 1 / (HV_contrarian / HV_contrarian_baseline) , min, max )
This creates a structural envelope that is widest during low-volatility regimes (where price tends to range) and tightens during high-volatility regimes (where price breaks through normal boundaries). The inner and outer levels use user-defined sigma multipliers.
What Problem Does It Solve ?
Traditional deviation bands (Bollinger, Keltner, VWAP bands) use fixed lookback windows and a single volatility metric. They do not reset at session boundaries, nor do they distinguish between different volatility regimes for mean-reversion versus breakout scenarios. The Equilibrium Deviation Engine solves this by :
- Resetting accumulators at each session (e.g., daily), producing a true volume-weighted equilibrium for the current period.
- Adapting band width to both the TWAP gap (directional drift) and HV regime (market excitement).
- Adding a separate contrarian channel using inverse volatility, specifically designed to identify exhaustion zones where low volatility precedes expansion, or where extreme HV signals climax conditions.
How To Interpret
Basis line (white) — the real-time volume-weighted fair value for the current session. Price above basis signals session bullishness ; price below signals session bearishness.
Deviation bands 1, 2, 3 — graduated zones of overextension from the basis. Price reaching Band 3 represents an extreme statistical deviation from the session's equilibrium, often preceding reversion.
Extreme contrarian channel — a separate envelope that behaves inversely to short-term HV. When this channel is wide (low HV, quiet market), price tends to oscillate within it, making the boundaries attractive mean-reversion levels. When the channel narrows sharply (high HV, excited market), it signals compression before a potential breakout.
Band expansion vs contraction — widening bands indicate increasing dispersion and adaptive uncertainty ; narrowing bands indicate consolidation and equilibrium tightening.
Parameters
LB Engine
Source — price field used for calculations (default HLC3).
Reset TF — timeframe at which accumulators reset (default Daily).
Hidden TWAP Length — period for the TWAP used in the TWAP gap weight.
Historical Volatility Length — period for HV calculation (main bands).
HV Smoothing — smoothing period for the HV baseline.
LB Bands
Deviation 1, 2, 3 — base multipliers for the three main deviation levels.
LB Contrarian Channel
Extreme Channel Inner/Outer — sigma multipliers for the contrarian channel.
Use Main HV Weight — applies the main HV weight to the contrarian channel.
Use Hidden TWAP Weight — applies the TWAP gap weight to the contrarian channel.
Contrarian Inverse HV Length — period for the HV used in the inverse weighting.
Contrarian Inverse HV Smooth — smoothing period for the contrarian HV baseline.
Contrarian Inverse HV Min/Max — clamping limits for the inverse weight.
LB Style
Show Basis, Show Main Fills, Color Bars — visual toggles.
Basis Width, Band Width, Extreme Channel Width — line thickness controls.
Reference
This indicator is a proprietary design by Luis Barlier. It synthesises concepts from session volume-weighted average price (VWAP), adaptive volatility bands, and inverse volatility regime detection. It does not correspond to a single academic publication. Indicator

Z-Score Source MonitorZ-Score Source Monitor
What this script does:
Z-Score Source Monitor calculates a rolling Z-Score on any external indicator line connected via the source input. It answers one question: how statistically extreme is the current reading of any oscillating indicator relative to its recent history?
A Z-Score of 0 means the source is exactly at its rolling mean. A reading of ±1 is within normal range. A reading beyond ±2 occurs roughly 5% of the time statistically, and beyond ±3 less than 1% of the time. These are the levels where statistical exhaustion tends to occur.
What makes this script original:
Most Z-Score indicators on PulseWire calculate the Z-Score on price. This script is built around a generic input.source — meaning it can calculate the Z-Score on any indicator plot, not just price. This makes it a universal statistical layer that can be placed on top of momentum oscillators, volume indicators, custom signals, or any other plotted line.
The volatility calculation uses EWMA (Exponentially Weighted Moving Average) variance rather than a fixed rolling standard deviation. This means the script adapts faster to changes in the statistical behavior of the source, without waiting for the full lookback window to shift. In fast-moving or regime-changing markets this produces a more responsive and accurate measure of statistical extension.
How to use it:
Connect any external indicator plot to the Source input. The script will calculate and display:
Smoothed Z-Score as histogram and line, color-coded by zone
Raw Z-Score as a reference behind the smoothed line
Reference lines at ±1σ, ±2σ and ±3σ
Dashboard showing current Z-Score, zone classification, direction and raw Z value
The example chart uses the Fast Line from Bjorgum's TSI indicator as the source input, demonstrating how the Z-Score identifies statistical extremes on a momentum oscillator.
Settings
Source: connect any external indicator plot
Lookback: number of bars for the rolling mean (default 20)
EWMA Half-Life: controls how quickly the volatility measure adapts to recent behavior (default 15)
Z-Score Smoothing: EMA smoothing applied to the raw Z-Score to reduce noise (default 3)
How to read the zones :
Gray: neutral, source near its mean
Light blue / light orange: mild extension beyond ±1σ
Blue / red: statistically extended beyond ±2σ — observe closely
Dark blue / dark red: rare extreme beyond ±3σ
Important note:
This script is an observation tool. It identifies statistical extremes but does not generate buy or sell signals. Always use it as additional context alongside your own analysis. Past statistical extremes do not guarantee future reversals. Indicator

V-AEMA VMR [LB]Concept
The V-AEMA VMR (Volume-Adaptive Exponential Moving Average with Volatility-Modulated Regime) is a hybrid trend-following indicator that combines an EMA baseline with a volatility-based drift component. It produces a dynamic core line whose colour reflects the trend regime, surrounded by two levels of adaptive bands that expand or contract based on volume intensity. The indicator generates directional entry signals when price breaks the first band in the direction of the trend, and projects take-profit zones when price fully exits both bands.
Mathematical Foundation
The core line (Hybrid Line) is a weighted blend of a standard EMA and a volatility-shifted version of that same EMA :
HybridLine = EMA * W + (EMA + Drift) * (1 - W)
where the drift is derived from the Z-Score of price relative to the EMA, scaled by ATR :
Drift = Z_Score * ATR * 0.35
Z_Score = (Price - EMA) / StdDev(Price, L_vola)
Band width starts from a base volatility measure combining standard deviation and ATR :
BaseWidth = StdDev * 0.65 + ATR * 0.35
This base is then adjusted by a volume ratio and user-defined multipliers :
UpperWidth = BaseWidth * (BaseUpMult + (VolRatio - 1) * VolImpactUp)
LowerWidth = BaseWidth * (BaseDnMult + (VolRatio - 1) * VolImpactDn)
where VolRatio = min(max(Volume / SMA(Volume, L_vol), 0.35), 2.50) .
Two band levels are generated : Band 1 at HybridLine +/- Width, and Band 2 (extreme) at HybridLine +/- Width * 1.55 (upper) / 1.40 (lower).
What Problem Does It Solve ?
Conventional envelope indicators (Bollinger Bands, Keltner Channels) apply fixed multipliers to a single volatility metric and ignore volume dynamics. The V-AEMA VMR adapts its band width to both volatility and volume surges, producing wider bands during high-participation moves and narrower bands during quiet periods. The hybrid core line reduces pure EMA lag by incorporating a volatility offset, while the dual-band structure filters signals by strength : a break of Band 1 triggers an entry, while a break of Band 2 confirms an explosive move and projects a take-profit zone.
How To Interpret
Core line colour – cyan/green indicates the hybrid line is rising (bull regime) ; magenta/red indicates it is falling (bear regime).
Cloud and bands – the area between Band 1 and Band 2 forms a halo that thickens when volume expands. Narrow bands suggest low conviction or consolidation.
Entry signals – a triangle appears below the bar when price crosses above Upper Band 1 while the hybrid line is rising (long). A triangle appears above the bar when price crosses below Lower Band 1 while the hybrid line is falling (short). These signals are confirmed by the trend direction.
Take-profit zones – when the entire bar (high and low for shorts, low and high for longs) clears the extreme band (Band 2) in the direction of the signal, a coloured box is projected forward. The box represents a potential target zone based on the breakout amplitude and ATR, scaled by the TP Factor.
Info panel – displays the current regime (BULL/BEAR), the volume ratio (values above 1.0 indicate above-average participation), and the current upper/lower deviation values in price units.
Parameters
EMA Length – period of the base exponential moving average (default 55).
Volatility Length – period for the standard deviation used in the Z-Score calculation (default 34).
Volume Length – period for the volume moving average used in the volume ratio (default 34).
EMA Weight – blend ratio between the pure EMA and the volatility-drifted version. Higher values produce a smoother line ; lower values make it more reactive to volatility (default 0.80).
Upper Base Deviation – core multiplier for the upper band width before volume adjustment (default 1.55).
Lower Base Deviation – core multiplier for the lower band width before volume adjustment (default 1.05).
Volume Impact Upper/Lower – sensitivity of the upper and lower bands to the volume ratio. Higher values make bands expand more aggressively when volume surges (default 0.95 / 0.55).
ATR Length – period of the Average True Range used in band width and TP zone calculations (default 14).
Show Cloud – toggles the filled areas between bands.
Show Info Panel – toggles the real-time dashboard.
Show Signals – toggles the entry triangles.
Show TP Zones – toggles the take-profit projection boxes.
TP Projection Bars – how many bars forward the TP zone extends.
TP Factor – scales the height of the TP zone relative to the breakout range.
Max Historical TP Zones – limits the number of TP boxes kept on the chart.
Reference
This indicator is a proprietary design synthesising concepts from adaptive moving averages (Kaufman, Ehlers), volatility envelopes (Bollinger, Keltner), and volume-weighted band models. It does not correspond to a single academic publication. Indicator

Bollinger Band [scoopup]Overview
A Bollinger Bands–based indicator that shows trend direction (up/down) through the basis line color, displays band width (volatility) as a percentage, and marks the most recent meaningful lows (demand zones) on the weekly and daily timeframes as boxes. It lets you view statistical volatility and the real low zones where buying previously stepped in — all on a single chart.
Default settings are Length 21 and StdDev 1.618, based on the Fibonacci number (21) and the golden ratio (1.618).
Components
1. Bollinger Bands (Upper / Basis / Lower)
Defaults: Length 21, StdDev 1.618
Upper band, basis (middle), and lower band. The bands widen and narrow with volatility.
2. Basis Line Trend Color (Daily-based)
The color of the middle basis line indicates trend direction.
Logic: over a set lookback, it compares the cumulative size of the "close-to-lower" area (red) versus the "upper-to-close" area (green).
Red area dominant → uptrend → basis line GREEN
Green area dominant → downtrend → basis line RED
The longer the close stays near the lower band (larger red area), the more it is read as base-building before a move higher.
This color is always calculated from Daily data, regardless of the chart timeframe. Whether you view it on the 15m, 1h, or 4h chart, the daily trend color stays consistent.
3. Fill
Upper band ↔ close: semi-transparent green
Close ↔ lower band: semi-transparent red
Lets you quickly read where the close sits within the bands.
4. Band Width (%)
Formula: (Upper − Lower) / Basis × 100
Displays the current band width in a corner table as Band Width: X.XX%.
Lower = volatility contraction (squeeze) → often precedes a large move; higher = volatility expansion.
The Data Window also shows band width % and band width (price difference), including on historical bars.
5. Recent Lows
Weekly recent low = yellow box / Daily recent low = red box
Shows only the most recent pivot (swing) low that sits below the current close. (Lows above the close are skipped; if the latest low is above the close, the prior low is used instead.)
Box height spans the low ↔ the close at that point, and extends to the right to show a still-valid support/demand zone.
How to Read It
Basis green + close near the lower band → watch for a potential bounce after base-building.
Basis red + close near the upper band → watch for overextension/pullback risk.
Band Width % contracting (squeeze) → watch for an upcoming volatility expansion.
Recent low boxes (yellow/red) act as first support candidates on a pullback. A close below the box signals support failure.
Key Settings
Bollinger Bands: Source, Length (default 21), StdDev (default 1.618), Band Color / Width / Style
Basis Line: Show Basis, Basis Width, Ratio Length, Up / Down Color
Fill: Show Fill, Upper / Lower Fill Transparency
Band Width: Show Band Width %, Table Position, Text Size
Recent Lows: weekly/daily toggles, Pivot Length, Box Color
Tips
This is a supporting tool for reading trend direction + volatility + support zones together, not a standalone trade signal.
Reliability increases when the daily trend color and a recent low box line up in the same area.
Adjust StdDev and Ratio Length to fit each instrument's volatility.
Disclaimer
This indicator is for reference only and does not guarantee trading profits. All trading decisions and responsibility rest solely with the user. Indicator

Intermarket Flow OscillatorAdvanced Macro Regime Tracking & Apex Reversal Detection
What is the Intermarket Flow Oscillator (IFO)?
The Intermarket Flow Oscillator (IFO) is a quantitative momentum tool designed to track capital rotation between risk-on assets (growth, equities) and risk-off assets (defensives, bonds, safe havens). By utilizing advanced statistical normalization and John Ehlers' digital signal processing, the IFO visualizes structural market regimes and pinpoints high-probability exhaustion reversals.
Whether you are trading swing setups on the daily chart or monitoring intraday capital flows, the IFO acts as a macro compass to keep you on the right side of institutional money.
The Mathematical Engine
Traditional spread indicators suffer from noise and asymmetric scaling. The IFO solves this using a two-step quantitative process:
Z-Score Normalization: The script calculates the natural log ratio of a Risk Asset versus a Safe Haven asset, then applies a rolling Z-Score. This transforms the intermarket spread into a stationary stochastic process, making standard deviation thresholds mathematically reliable.
John Ehlers' 2-Pole SuperSmoother: To eliminate high-frequency market noise without introducing the severe phase lag typical of moving averages, the Z-Score is passed through an advanced DSP filter.
How to Read the Signals
Trend Shifts & Structural Regimes (The Zero-Line)
The smoothed oscillator crossing the zero equilibrium line indicates a macro shift in capital allocation.
Green Cloud (IFO > 0): Structural Risk-On Regime. Institutions are accumulating risk/growth. Traders should look for long momentum setups and favor high-beta assets.
Red Cloud (IFO < 0): Structural Risk-Off Regime. Capital is fleeing to safety. Traders should focus on cash preservation, defensive value, or short setups.
Apex Mean-Reversion Turns (▲ and ▼)
The script calculates the first derivative (Velocity) of the smoothed capital flow. When the oscillator reaches extreme statistical exhaustion thresholds (default ±1.5 standard deviations) and the velocity flips, the IFO prints a high-contrast triangle.
Bullish Apex (▲): Occurs deep in negative territory (panic/capitulation). Represents a mathematically optimal exhaustion point where selling pressure is dying. Excellent for buying the bottom in growth stocks.
Bearish Apex (▼): Occurs high in positive territory (euphoria). Represents exhaustion in risk-taking and serves as an early warning to take profits or look for short entries.
Practical Trading Application: Sector Rotation (XLK vs. XLP)
While the default script pairs S&P 500 Futures (ES) against 10-Year Treasuries (ZN), the true power of the IFO shines in sector rotation.
The Setup: Set the Risk Asset to XLK (Technology) and the Safe Haven to XLP (Consumer Staples).
The Logic: XLK represents high-beta, duration-sensitive growth (Apple, Microsoft, Nvidia). XLP represents inelastic consumer demand (Procter & Gamble, Walmart). This spread is the ultimate risk-on/risk-off gauge.
Key Features & Customization
Customizable Pairs: Fully adjustable inputs to test different macro pairs (e.g., BTC vs. Gold, BTCUSDT.P vs. USDT, Discretionary vs. Utilities, High Yield Bonds vs. Treasuries).
Dynamic Coloring: The oscillator line shifts between bright/faded colors based on momentum velocity, giving you a visual cue before a crossover even happens.
Indicator

Median ATR SD OscillatorMedian ATR SD Oscillator
Median ATR SD Oscillator is a trend-following volatility oscillator that measures the distance between price and two independent reference levels — an ATR band and a standard deviation band — both anchored to a percentile-based median. The asymmetric design uses different volatility measures for long and short signals, creating a natural bias toward staying in bullish trends longer while reacting quickly to breakdowns.
The result is an area oscillator that expands above zero in a confirmed bullish state and contracts below zero in a bearish state, with a white EMA line as a momentum confluence filter.
How It Works
A percentile median is calculated from a configurable price source — giving a robust, noise-resistant central reference level that adapts to recent price behavior.
Two independent volatility bands are then derived from this median:
ATR Band — median plus ATR multiplied by a configurable factor. The short condition uses the ATR band — price must fall below it to confirm a bearish state
SD Band — median plus the standard deviation of close. The long condition uses the standard deviation band — price must break above it to confirm a bullish state
Once a directional state is confirmed, the oscillator measures the distance between price and its reference level. An EMA of this distance acts as a confluence filter — the final signal only confirms when the distance is not only positive or negative but also above or below its own EMA, ensuring momentum is genuinely building in that direction.
Why This Approach Works
Most oscillators use a single volatility measure for both long and short signals. The Median ATR SD Oscillator deliberately uses two different measures — ATR for shorts and SD for longs — because they capture different market dynamics and create a natural asymmetry between entries and exits.
This asymmetric design reflects the structural reality of markets like crypto — price spends more time trending upward than downward. Longs require a statistically significant breakout above the SD band, while shorts only need price to fall back below the ATR band. The result is a system that stays in bullish trends longer while reacting quickly when momentum fades.
Settings
Median Source — Price source for the percentile median calculation (default: hl2)
Median Length — Lookback period for the percentile median (default: 63)
ATR Length — Lookback period for the ATR calculation (default: 4)
ATR Factor — Controls the width of the ATR band (default: 1.0)
SD Length — Lookback period for the standard deviation calculation (default: 29)
Use EMA — Enables the EMA confluence filter (default: true)
EMA Length — Lookback period for the EMA confluence filter (default: 35)
Use Bar Coloring — Colors bars based on the current state (default: true)
Color Background — Enables background coloring of the chart based on the current state (default: false)
Background Transparency — Controls the transparency of the background color (default: 85)
How to trade it
Long — when the oscillator expands above zero and the area turns blue, a bullish state has been confirmed. This is the signal to look for long entries or to hold existing long positions
Short / Cash — when the oscillator contracts below zero and the area turns red, the momentum has faded. This is the signal to exit longs, move to cash, or look for short entries depending on your strategy
EMA line — when the area is above the white EMA line momentum is building, when it crosses below momentum is weakening
Recommended Usage
Best used on the 1D timeframe for clean and reliable signal generation
Should not be used alone for trade entries — combine with an additional confirmation indicator for best results
The asymmetric ATR/SD design makes this oscillator particularly well suited for bullish-biased markets like crypto
Higher ATR Factor values make short exits more sensitive — lower values make them less reactive
Higher SD Length values create more stable long signals — lower values make them more reactive to short-term price movements
All signals are confirmed on bar close. Indicator

Miner Profitability Index | Astral Vision Miner Profitability Index | Astral Vision 🌠💠
This indicator constructs a measure of Bitcoin miner profitability per unit of mining difficulty, then applies Z-Score normalization in log space to quantify how statistically extreme current profitability conditions are relative to their own history. Miner profitability is a structurally important on-chain signal because miners are one of the few participants with predictable and measurable cost structures: when profitability collapses, miners are forced to sell reserves to cover operational costs, creating persistent sell pressure; when profitability is exceptionally high, miners tend to accumulate and expand capacity, which historically precedes periods of increased hash rate and eventually difficulty adjustment that compresses margins back toward equilibrium.
Calculation ⚙️
The daily miner revenue in USD is computed from three components: the number of blocks mined that day (computed as the difference between consecutive daily block height readings from Glassnode), the block subsidy in BTC (derived from the block height using the halving schedule: 50 BTC before block 210,000, halving at each subsequent 210,000-block interval), and the current Bitcoin price in USD. The formula is: miner revenue = blocks per day × block reward × BTC price.
This revenue figure is then divided by the current mining difficulty to produce the efficiency ratio: miner revenue / difficulty. Difficulty represents the computational work required to mine a block and serves as a proxy for the aggregate energy and capital expenditure of the mining network. Dividing revenue by difficulty produces a measure of how many dollars miners earn per unit of computational difficulty, normalizing for the expanding size of the mining network over time. Without this normalization, absolute revenue would grow indefinitely simply due to price appreciation and hash rate expansion, making historical comparisons meaningless.
The efficiency ratio is smoothed with a configurable EMA to reduce the noise introduced by day-to-day variation in block count. The natural logarithm is then taken before applying the Z-Score, which is necessary because the efficiency ratio follows an approximately log-normal distribution: in raw space it would be heavily right-skewed, making the standard deviation an unreliable measure of typical deviation. In log space the distribution is much more symmetric and the Z-Score thresholds carry consistent statistical meaning across all periods.
The Z-Score is computed as: (log(efficiency) - SMA(log(efficiency), N)) / StDev(log(efficiency), N), where N is the configurable lookback window. This expresses how many standard deviations the current log-efficiency sits above or below its rolling historical mean. Two pairs of thresholds define moderate and severe extreme zones on each side.
Plots 📊
Z-Score oscillator colored by zone: two upper levels and two lower levels with graduated opacity
Two upper and two lower threshold lines
Zero midline
Fill highlights when Z-Score is beyond the outer thresholds
Static zone fills between inner and outer thresholds on both sides
Background color on the price chart with four gradient levels reflecting zone severity
Inputs 🎛️
Z-Score Lookback: rolling window for mean and standard deviation normalization
Smoothing: EMA period applied to the raw efficiency ratio before log transformation
Upper Z 1 and Upper Z 2: configurable inner and outer upper threshold levels
Lower Z 1 and Lower Z 2: configurable inner and outer lower threshold levels
Colors 🎨
5 Astral Vision presets + custom override. Default: Futura.
Purpose 🎯
Standard miner revenue charts display absolute USD earnings, which grow indefinitely with price and provide no statistical context for whether current conditions are extreme or normal. Dividing by difficulty removes the network size effect, and normalizing with a Z-Score in log space makes readings directly comparable across all market cycles including early periods when absolute revenue was tiny. The dual threshold system separates mild deviations from statistically severe conditions, providing a more granular signal than a single overbought/oversold level.
Disclaimer ⭕️
This indicator is for informational and educational purposes only. It does not constitute financial advice. Past performance is not indicative of future results. Always do your own research before making investment decisions. Indicator

Whale Accumulation Index | Astral Vision Whale Accumulation Index | Astral Vision 🌠💠
This indicator tracks the proportion of Bitcoin's total on-chain transaction volume attributable to large transactions, using CoinMetrics data to separate whale-scale activity from retail-scale activity, then applies two different analytical lenses to that ratio to identify when large holders are accumulating or distributing at statistically unusual rates.
Calculation ⚙️
The base input is the ratio of large transaction volume to total transaction volume in USD, both fetched from CoinMetrics on a daily timeframe. Large transaction volume measures the aggregate USD value of all on-chain transactions above a defined size threshold, while total transaction volume covers all on-chain activity. Dividing the two produces a ratio between 0 and 1 that measures what fraction of all Bitcoin moved on-chain each day was moved by large participants. A rising ratio means whale activity is growing as a share of total network flow; a falling ratio means retail activity is proportionally dominant. This ratio is smoothed with a configurable SMA before all subsequent calculations.
The indicator offers two modes that address different analytical questions.
Z-Score mode normalizes the smoothed ratio against its own rolling mean and standard deviation over a configurable lookback window. The formula is: Z = (ratio - mean(ratio, N)) / stdev(ratio, N). This produces a reading that measures how statistically unusual the current whale dominance level is relative to its own history. A positive Z-Score means whale share of volume is elevated above its historical norm; a negative Z-Score means it is depressed. The thresholds mark the statistically extreme zones where readings have historically been rare.
Conviction mode computes a divergence signal between whale momentum and price momentum. For each series, the rate of change over a configurable lookback is computed as (current - past) / abs(past), producing a proportional momentum measure. Both the price ROC and the whale ratio ROC are then independently Z-Score normalized, and the conviction signal is the difference: whale Z-Score minus price Z-Score. A positive conviction reading means whale activity is accelerating faster than price, historically associated with accumulation ahead of price moves. A negative reading means price is running ahead of whale activity, historically associated with distribution or weak institutional participation in the current price move.
Plots 📊
Main oscillator in Z-Score or Conviction mode, colored by threshold zone
Overbought and oversold threshold lines
Fill highlight when oscillator enters either extreme zone
Background color on the price chart when oscillator is in extreme zones
Inputs 🎛️
Mode: Z-Score or Conviction
OB Threshold Z-Score and Conviction: configurable upper extreme levels per mode
OS Threshold Z-Score and Conviction: configurable lower extreme levels per mode
Z-Score Window: normalization lookback for both modes
Smoothing: SMA period applied to the raw whale ratio before calculations
Conviction ROC Length: lookback for the rate of change in Conviction mode
Colors 🎨
5 Astral Vision presets + custom override. Default: Inferno.
Purpose 🎯
Standard volume indicators measure total on-chain or exchange volume without distinguishing between the size of individual transactions, treating a single $100 million transfer the same as ten thousand $10,000 transfers in aggregate volume terms. This indicator isolates the large-transaction component specifically, making it possible to detect when whale-scale capital is disproportionately active on-chain relative to its historical baseline. The Conviction mode adds a second dimension by measuring whether whale activity is leading or lagging price, separating periods where large holders are front-running price moves from periods where they are simply responding to them.
Disclaimer ⭕️
This indicator is for informational and educational purposes only. It does not constitute financial advice. Past performance is not indicative of future results. Always do your own research before making investment decisions. Indicator

OTHERS/USDT.D Z-Score | Astral Vision OTHERS/USDT.D Z-Score | Astral Vision 🌠💠
This indicator constructs a ratio between the OTHERS market cap dominance and USDT dominance, then applies Z-Score normalization in log space to measure how statistically extreme the current positioning of altcoin capital relative to stablecoin dry powder is compared to its own history.
OTHERS dominance tracks the combined market cap share of all cryptocurrencies excluding Bitcoin, Ethereum, and the top few large caps, making it a direct proxy for altcoin season conditions. USDT dominance measures the share of total crypto market cap held in Tether, which rises when capital exits risk assets into stablecoins and falls when stablecoin capital is deployed into crypto assets.
Calculation ⚙️
The ratio is computed as OTHERS dominance divided by USDT dominance on a daily timeframe. A high ratio means altcoin capital is large relative to stablecoin reserves, indicating that available dry powder has been deployed and the altcoin market is extended. A low ratio means stablecoin dominance is high relative to altcoin exposure, indicating that capital has retreated to safety and dry powder is accumulating.
The natural logarithm of this ratio is then taken before all subsequent calculations. Working in log space normalizes the exponential growth of both series across different market cycles, ensuring that a ratio change from 2 to 4 is treated as equivalent in magnitude to a change from 4 to 8, which is the correct treatment for proportional dominance relationships.
A simple moving average and standard deviation are computed over the configurable Z-Score lookback window, producing the Z-Score as: (log ratio minus mean) / standard deviation. This expresses the current ratio in units of standard deviations above or below its own historical average, making readings directly comparable across cycles regardless of the absolute dominance levels involved.
In Trend mode, an EMA of configurable length is applied to the Z-Score itself, functioning as a signal line. When the Z-Score is above its EMA, the momentum of the ratio is positive and altcoin conditions are improving relative to stablecoin reserves; when below, the momentum is negative.
Plots 📊
Z-Score oscillator colored by mode and regime
Two upper threshold lines marking statistically elevated altcoin exposure (Extremes mode)
Two lower threshold lines marking statistically depressed altcoin exposure (Extremes mode)
Fill highlights when Z-Score enters the outer extreme zones
Zero baseline
EMA signal line (Trend mode)
Background color on the price chart when Z-Score enters the outer extreme zones (Extremes mode)
Candle coloring on the price chart reflecting current regime in both modes
Inputs 🎛️
Visualization: Extremes or Trend
Z-Score Lookback: normalization window for mean and standard deviation
Upper Z 1 and Upper Z 2: configurable inner and outer upper threshold levels
Lower Z 1 and Lower Z 2: configurable inner and outer lower threshold levels
EMA Length: smoothing period for the trend signal line (Trend mode)
Colors 🎨
5 Astral Vision presets + custom override. Default: Futura.
Purpose 🎯
Standard altcoin season indicators use fixed dominance thresholds or simple moving average crossovers on raw dominance values, which are not statistically normalized and behave differently across cycles as the total crypto market cap grows. This indicator normalizes the ratio in log space over a long rolling window, making a Z-Score of +2.0 in 2021 and a Z-Score of +2.0 in 2024 carry equivalent statistical weight despite the absolute dominance percentages being different. The dual threshold system further separates moderate elevated conditions from statistically severe ones, allowing a more nuanced reading than a single overbought/oversold line can provide.
Disclaimer ⭕️
This indicator is for informational and educational purposes only. It does not constitute financial advice. Past performance is not indicative of future results. Always do your own research before making investment decisions. Indicator
