MIDAS Fibonacci Cloud [JOAT]MIDAS Fibonacci Cloud
Introduction
MIDAS Fibonacci Cloud is an open-source VWAP-based analytical tool that combines a MIDAS-anchored volume-weighted average price with six Fibonacci-scaled standard deviation bands, a Z-score probability engine, and a synthetic order flow score to produce an integrated picture of institutional value, statistical deviation, and directional pressure on a single overlay.
The problem this solves is band relevance. Standard VWAP deviations use fixed multipliers (1×, 2×, 3× standard deviation) that carry no structural meaning in market terms. Replacing those multipliers with Fibonacci ratios (0.236, 0.382, 0.5, 0.618, 1.0, 1.618) means the band levels correspond to proportional retracement relationships that institutional participants commonly reference. The 1.618 band in particular acts as an extreme extension zone where reversion probability, quantified by the built-in Z-score engine, typically exceeds 99.7%.
Core Concepts
1. MIDAS VWAP with Configurable Anchoring
The VWAP calculation uses the MIDAS method — cumulative volume-weighted price that resets at a user-selected anchor point rather than running as a continuous session VWAP. The anchor can be set automatically (based on the current timeframe), manually to a specific higher timeframe, or to a precise date. This allows the VWAP to be anchored to any significant market event.
The variance term used for standard deviation is computed directly from the volume-weighted sum of squared prices, producing a statistically correct VWAP standard deviation:
float midasVwap = sumVolPrice / sumVol
float variance = (sumVolSq / sumVol) - math.pow(midasVwap, 2)
float stdDev = math.sqrt(math.max(0, variance))
2. Fibonacci Deviation Bands
Six band pairs are computed above and below the VWAP anchor using the standard deviation scaled by a global sensitivity multiplier and each Fibonacci ratio. Upper bands are colored in the bull theme color with decreasing opacity from band 1 to band 6; lower bands in the bear theme color with the same gradient. A gradient fill connects the outer zone (fib4–fib6) to visually highlight the extreme deviation region.
3. Z-Score and Bell Curve Probability
Each bar's Z-score is computed as the signed distance from the VWAP in units of standard deviation. The dashboard converts this to a mean-reversion probability using standard normal distribution thresholds: within 1σ = 68.2%, within 2σ = 95.4%, within 3σ = 99.7%, beyond 3σ = 99.9%.
4. Synthetic Order Flow Score
A bar-level order flow score is computed from three components: candle body-to-range ratio (directional conviction), volume relative to the 20-bar average (institutional participation), and wick rejection percentage (price acceptance or rejection). These are weighted 40/35/25 and scored 0 to 100. VWAP crossover signals are gated by this score — crossovers with low order flow scores are filtered as noise.
5. Gradient Fill Zones
The two outer Fibonacci bands (fib4 and fib6) are connected with a gradient fill that creates a visual glow effect identifying the extreme deviation zones — the regions where price is statistically most likely to be overextended.
Features
MIDAS VWAP with three anchor modes: Auto (timeframe-adaptive), Timeframe (manual higher TF), Date (specific date anchor)
Six Fibonacci deviation band pairs: Levels at 0.236, 0.382, 0.500, 0.618, 1.000, 1.618 × standard deviation × global sensitivity
Gradient fill on extreme zones: Color-to-transparent gradient between fib4 and fib6 identifies overextension zones
Z-score and reversion probability: Computed every bar with bell curve probability output (68.2% / 95.4% / 99.7% / 99.9%)
Synthetic order flow gate: Body ratio, volume participation, and wick rejection combined into a 0-100 score that gates VWAP cross signals
Candle coloring by Z-score: Bar colors intensity-coded by distance from VWAP — neutral near center, saturated at extremes
Band labels at right edge: Each band level labeled with its Fibonacci ratio and price value, updated each bar
Anchor reset marker: Vertical marker in elite theme color at each VWAP reset point
Four color themes: Phantom, Neon, Classic, Solar
Non-repainting: VWAP and bands computed cumulatively from anchor; no future data referenced
Institutional dashboard: 8-row table showing VWAP price, distance %, Z-score, reversion probability, order flow score, and market state
Input Parameters
Anchor Settings:
Anchor Method: Auto / Timeframe / Date
Manual Timeframe: Timeframe to anchor to when method is Timeframe
Manual Date: Specific timestamp when method is Date
Fibonacci Multipliers:
Global Sensitivity: Scales all band widths proportionally (default: 1.2)
Fib Level 1 through 6: Individual Fibonacci ratios (defaults: 0.236, 0.382, 0.500, 0.618, 1.000, 1.618)
Visual Styles:
Color Theme: Phantom / Neon / Classic / Solar
Highlight Candles: Toggle candle coloring by Z-score
Show Band Labels: Toggle right-edge price labels on each band
Table Position and Size
How to Use This Indicator
Step 1: Choose Your Anchor
For intraday scalping, use Auto or Daily anchor. For swing trading, use Weekly or Monthly. For event-driven analysis, use Date and anchor to a specific earnings release, FOMC announcement, or major swing point.
Step 2: Read Band Levels as Statistical Reference
The 0.5 band is one half standard deviation from VWAP — a mild deviation typical of normal trending behavior. The 1.618 band is the extreme extension zone. Price at the 1.618 band has a statistical reversion probability above 99.7%, but this does not mean reversion is imminent or guaranteed.
Step 3: Check the Reversion Probability
Read the Reversion Prob row in the dashboard. As Z-score rises above 2, reversion probability exceeds 95.4%. This quantifies how unusual the current deviation is relative to the full history from the anchor point.
Step 4: Confirm with Order Flow Score
The Order Flow score reflects whether the current bar has institutional characteristics. A high score (above 60) during a VWAP cross suggests genuine participation. A low score (below 30) during a cross suggests a potentially false signal.
Indicator Limitations
The VWAP standard deviation widens significantly with the anchor period. Bands anchored to a six-month period will be very wide; bands anchored to one day will be tight. The global sensitivity parameter must be adjusted accordingly
The Z-score probabilities assume normally distributed returns, which markets do not produce. Fat tails mean extreme Z-scores occur more frequently than the percentages suggest
The synthetic order flow score uses tick volume as a proxy for actual order flow. On assets with low tick frequency, this approximation is less reliable
VWAP-based analysis is most relevant for liquid instruments
This indicator does not generate entry or exit signals. It provides statistical deviation context
Originality Statement
Replacing standard deviation band multipliers with Fibonacci ratios (0.236 through 1.618), scaled by a volume-weighted standard deviation from a MIDAS anchor, is not replicated in existing open-source Pine Script v6 VWAP publications
The combination of Z-score computation, bell curve probability quantification, and a synthetic order flow score as a gate for VWAP cross signals within a single indicator is an original integration
The candle coloring gradient driven by Z-score intensity provides real-time deviation awareness directly on price bars without requiring a separate oscillator panel
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Trading involves substantial risk of loss. Statistical deviation probabilities are based on a normal distribution assumption that financial markets do not satisfy. Past VWAP behavior does not predict future price action. The author accepts no responsibility for trading losses resulting from use of this indicator.
Made with passion by jackofalltrades
Indicateur Pine Script®






















