Long-Term VWAP Mean Reversion SDCA

This indicator is designed to support Strategic Dollar Cost Averaging (SDCA) for Bitcoin using a cumulative VWAP-based mean reversion model. It helps long-term investors identify high-conviction buy zones and overbought conditions using statistical deviation from the cumulative VWAP. This indicator evaluates how much price is stretched from the true market average price, weighted by cumulative volume over time.
Core Concepts and Formulas:
Cumulative VWAP (Volume Weighted Average Price):
VWAPcumulative = ∑(Price×Volume) / ∑Volume
A long-term anchor that reflects the average dollar cost of all market participants across all candles. This version does not reset daily, unlike intraday VWAP.
VWAP Deviation %:
Deviation% = Price - VWAPcumulative / VWAPcumulative x 100
Shows how far current price has diverged from the long-term fair value.
Z-Score of VWAP Deviation:
Z= (Price−VWAP)−μ / σ (lookback period: default 200)
SDCA Multiplier Mapping:
*Keep in mind in my Z-Score system, -2 represents the overbought level (white horizontal line) and +2 represents oversold (cyan horizontal line) conditions. So the scores on the Y axis and Z-score in the table are reversed.
| Z-Score Range | SDCA Multiplier |
---------------------------------------------
| ≤ -2 | 0.25×
| -1 to +1 | 1.0×
| > +2 | 2.0×
The pink line plots this multiplier. It’s meant to control buy weight at each time step.
How to Use This for SDCA:
-Buy normally when the multiplier is 1.0× (Z-score between -1 and +1)
-Accelerate buying when Z-score is deeply negative (price far below VWAP)
-Slow or pause buying when Z-score is high (price far above VWAP)
-Use the stats panel to track current Z-score, VWAP level, deviation %, and multiplier
-Watch the red/blue backgrounds as visual confirmation of oversold/overbought zones
Inputs:
Z-Score Lookback Length:
Default: 200 but can be adjusted.
Visuals:
Z-Score Line (cyan): shows current standardized deviation from VWAP
Multiplier Line (bright pink): your SDCA intensity signal
Background Zones: cyan = oversold, white = overbought
Horizontal Lines: +2 and -2 standard deviation thresholds
Stats Panel (bottom right): live values for Z-score, multiplier, price, VWAP, and the deviation formula
Suited For:
-Long-term Bitcoin investors
-SDCA Systems
-Mean reversion systems
-Macro-level buy/sell planning
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.
Declinazione di responsabilità
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Per un accesso rapido a un grafico, aggiungi questo script ai tuoi preferiti: per saperne di più clicca qui.