OPEN-SOURCE SCRIPT

Rolling Midpoints of Price vs 50% Fib

237
This script overlays two complementary midpoint lines on your chart to reveal evolving bias, structural imbalances, and zones of mean reversion:
🔸 The Price Midpoint tracks a dynamic center based on the raw price range over a user-defined lookback.
🔸 The Fib Midpoint is calculated from the most recent confirmed swing high and low, forming a live 50% Fibonacci retracement — then smoothed for trend stability.

📘 What Is Mean Reversion, and Why Midpoints Matter?
Markets often oscillate between periods of trend and consolidation. Mean reversion refers to the tendency of price to return to a “fair value” after stretching too far in one direction. The Price Midpoint captures this range-based balance, while the Fib Midpoint anchors to structural swing levels. When price strays far from both, it may be overextended — setting the stage for pullbacks or reversion. When price hovers between or tests both midlines, it reflects balance or indecision. EquiZone helps visualize this dynamic, offering traders real-time insight into whether price is moving with strength, fading, or snapping back to equilibrium.

🔍 Concept Breakdown
➖Price Midpoint – A rolling midpoint between the highest high and lowest low over a user-defined lookback. Think of it as a range-weighted equilibrium.
➖Fib Midpoint – A dynamic 50% Fibonacci retracement between the most recent confirmed swing high and swing low (based on pivot logic), smoothed over time for stability.
➖Color-coded Fills & Bar Colors – Highlight confluence and divergence between the two midpoints, offering intuitive visual cues on trend alignment or structural disagreement.

🎯 Why It’s Useful
➖Spot consolidation zones and structural inflection points
➖Detect hidden divergence between price action and swing structure
➖Use midpoint alignment as a trend confirmation filter
➖Identify mean reversion setups when price strays too far from both midlines
➖Visualize market equilibrium across two complementary perspectives

⚙️ Customizable Features
➖Independent lookbacks for both midpoints
➖Toggle fill shading and adjust color schemes
➖Choose from multiple bar color modes (Close, HL2, OHLC3, OHLC4)
➖Control pivot sensitivity via left/right bar windows
➖Select pivot source: high, low, or close

🧠 How to Use
➖When Price Mid > Fib Mid, momentum may be outrunning structure → bullish extension
➖When Fib Mid > Price Mid, structure leads but price lags → bearish potential or fading momentum
➖When the two lines converge, it signals a zone of balance or potential breakout setup
➖Use bar colors to confirm whether price is leading or following structure

🔧 This isn’t just a visual overlay — it’s a structure-aware bias engine.

Best For:

📈 Trend-followers seeking confirmation between price action and structure
🔄 Reversal traders watching for midpoint divergence
📊 Range traders identifying dynamic fair-value zones
🔍 Price-action analysts who want a clean, non-lagging context layer

➡️ Built for clarity and speed, EquiZone adds zero clutter and works seamlessly across all timeframes and asset types. It pairs especially well with support/resistance zones, trendlines, Fibonacci ladders, and price action patterns.

📌 Final Note:
While Rolling Midpoints provides insight into market balance and directional bias, no single indicator should be traded in isolation. For best results, combine it with contextual tools such as trend structure, volume analysis, higher-timeframe mapping, and clear entry/exit frameworks. Use this as a bias confirmation tool, not a trigger by itself.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.