OPEN-SOURCE SCRIPT
Rolling Midpoint of Price & VWAP with ATR Bands

The Rolling Midpoint of Price & VWAP with ATR Bands indicator is a dual-equilibrium concept that fuses price-range structure and traded-volume flow into one continuously updating hybrid model. Traditional VWAPs reset each session and reflect where trading occurred by volume, while midpoints used here reveal where price has structurally balanced between extremes. This script merges both ideas into a cohesive, dynamic system. The Rolling Price Midpoint (50 % of range) represents the structural fair-value line, calculated as the average of the highest high and lowest low over a selected window. The Rolling VWAP (Volume-Weighted Window) tracks the flow-based fair-value line by weighting each bar’s typical price by its volume. Together, these components form the Hybrid Equilibrium — the adaptive center of gravity that shifts as price and volume evolve. Surrounding this equilibrium, ATR Bands at ± 2.226 ATR and ± 5.382 ATR define volatility envelopes that expand and contract with market energy. The result is a living cloud that breathes with the market: compressing during phases of balance and widening during impulsive movements, offering traders a clear visual framework for understanding equilibrium, volatility, and directional bias in real time.
➖
⚙️ Auto-Preset System
The Auto-Preset System intelligently adjusts lookback windows for both the Price Midpoint and VWAP calculations according to the active chart timeframe.
This ensures that the indicator automatically adapts to any trading style — from scalping on 1-minute charts to swing trading on daily or weekly charts — without manual tuning.
🔹 How It Works
When Auto-Preset mode is enabled, the script dynamically selects the most effective lookback lengths for each timeframe.
These presets are optimized to balance responsiveness and stability, maintaining consistent real-world coverage (e.g., the same approximate duration of price data) across all intervals.
📊 Preset Mapping Table
| Chart Timeframe | Price Midpoint Lookback | VWAP Lookback |
|:----------------:|:-----------------------:|:--------------:|
| 1–3m | 13 bars | 21 bars
| 5–10m | 21 bars | 34 bars
| 15–30m | 34 bars | 55 bars
| 1–2 hr | 55 bars | 89 bars
| 4 hr-1D | 89 bars | 144 bars
| 1W | 144 bars | 233 bars
| 1M | 233 bars | 377 bars
⚡ Notes & Customization
- Manual Override: Turn off Auto-Preset Mode to specify your own custom lookback lengths.
- Consistency Across Scales: These adaptive values keep the indicator visually coherent when switching between timeframes — avoiding distortions that can occur with static lengths.
- Practical Benefit: Traders can maintain a single chart layout that self-tunes seamlessly, removing the need to manually recalibrate settings when shifting from short-term to long-term analysis.
In short, the Auto-Preset System is designed to make this hybrid equilibrium tool timeframe-aware — automatically scaling its logic so that the cloud behaves consistently, regardless of chart resolution.
➖
🌐 Hybrid Equilibrium Envelope
The core hybrid midpoint acts as the mean of structural (price) and volumetric (VWAP) balance.
ATR-based bands project natural expansion zones:
🔸+2.226 / –2.226 ATR → inner equilibrium (controlled trend)
*🔸+5.382 / –5.382 ATR → outer volatility extension (over-stretch / reversion zones)
Color-coded fills show regime strength:
* 🟧 Upper Outer (+5.382) – strong bullish expansion
* 🟩 Upper Inner (+2.226) – trending equilibrium
* 🔴 Lower Inner (–2.226) – mild bearish control
* 🟣 Lower Outer (–5.382) – volatility exhaustion
➖
🧭 Higher-Timeframe Framework
Two macro anchors — Price length of 144 and VWAP length of 233 — outline higher-timeframe bias zones. These help confirm when local momentum aligns with (or fades against) long-term structure.
Labels on the right show active lookback values for quick readout:
`$(13) V(21)` → current rolling pair
`$144 / V233` → macro anchors
➖
🧩 Chart Examples
**AMD 15m (Equilibrium Expansion)**
Price steadily rides above the hybrid midpoint as teal and orange (bullish) ATR zones widen, confirming a phase of controlled bullish volatility and healthy trend expansion.

BTCUSD 1m (Volatility Compression)
Bitcoin coils tightly inside the teal-to-maroon equilibrium bands before breaking out.
The hybrid midpoint flattens and ATR envelopes contract, signaling a state of balance before volatility expansion.

ETHUSD 15m (Transition from Compression → Impulse)
Ethereum transitions from purple-zone compression into a clear upper-band expansion.
The hybrid midpoint breaks above the macro VWAP 233, confirming the shift from equilibrium to directional momentum.

SOFI 1m (Micro Bias Reversal)
SOFI’s intraday structure flips as price reclaims the hybrid midpoint.
The macro VWAP 233 flattens, signaling a transition from oversold lower bands back toward equilibrium and early trend recovery.

➖
🎯 How to Use
1. Bias Detection – Price > Hybrid Midpoint → bullish; < → bearish.
2. Volatility Gauge – Watch band spacing for compression / expansion cycles.
3. Confluence Checks – Align Hybrid Midpoint with HTF 233 VWAP for strong continuation signals.
4. Mean Reversion Zones – Outer bands highlight areas where probability of snap-back increases.
➖
🔧 Inputs & Customization
Auto Presets toggle
🔸Manual Lookback Overrides** for fine-tuning
🔸Plot Window Length** (show recent vs full history)
🔸ATR Sensitivity & Fill Opacity** controls
🔸Label Padding / Font Size** for cleaner overlay visuals
➖
🧮 Formula Highlights
➖Rolling Midpoint = (highest(high,N) + lowest(low,N)) / 2
➖Rolling VWAP = Σ(Typical Price×Vol) / Σ(Vol)
➖Hybrid = (PriceMid + VWAP) / 2
➖Upper₂ = Hybrid + ATR×2.226
➖Lower₂ = Hybrid − ATR×2.226
➖Upper₅ = Hybrid + ATR×5.382
➖Lower₅ = Hybrid − ATR×5.382
➖
🎯 Ideal For
➡️ Traders who want adaptive fair-value zones that evolve with both price and volume.
➡️ Analysts who shift between scalping, swing, and position timeframes, and need a tool that self-adjusts.
➡️ Those who rely on visual structure clarity to confirm setups across changing volatility conditions.
➡️ Anyone seeking a hybrid model that unites structural range logic (midpoint) and flow-based balance (VWAP).
➖
🏁 Final Word
This script is more than a visual overlay — it’s a complete trend and structure framework built to adapt with market rhythm. It helps traders visualize equilibrium, momentum, and volatility as one cohesive system. Whether you’re seeking clean trend alignment, dynamic support/resistance, or early warning signs of reversals, this indicator is tuned to help you react with confidence — not hindsight.
➖
Remember — no single indicator should ever stand alone. For best results, pair it with price action context, higher-timeframe structure, and complementary tools such as moving averages or trendlines. Use it to confirm setups, not define them in isolation.
💡 Turn logic into clarity, structure into trades, and uncertainty into confidence.
➖
⚙️ Auto-Preset System
The Auto-Preset System intelligently adjusts lookback windows for both the Price Midpoint and VWAP calculations according to the active chart timeframe.
This ensures that the indicator automatically adapts to any trading style — from scalping on 1-minute charts to swing trading on daily or weekly charts — without manual tuning.
🔹 How It Works
When Auto-Preset mode is enabled, the script dynamically selects the most effective lookback lengths for each timeframe.
These presets are optimized to balance responsiveness and stability, maintaining consistent real-world coverage (e.g., the same approximate duration of price data) across all intervals.
📊 Preset Mapping Table
| Chart Timeframe | Price Midpoint Lookback | VWAP Lookback |
|:----------------:|:-----------------------:|:--------------:|
| 1–3m | 13 bars | 21 bars
| 5–10m | 21 bars | 34 bars
| 15–30m | 34 bars | 55 bars
| 1–2 hr | 55 bars | 89 bars
| 4 hr-1D | 89 bars | 144 bars
| 1W | 144 bars | 233 bars
| 1M | 233 bars | 377 bars
⚡ Notes & Customization
- Manual Override: Turn off Auto-Preset Mode to specify your own custom lookback lengths.
- Consistency Across Scales: These adaptive values keep the indicator visually coherent when switching between timeframes — avoiding distortions that can occur with static lengths.
- Practical Benefit: Traders can maintain a single chart layout that self-tunes seamlessly, removing the need to manually recalibrate settings when shifting from short-term to long-term analysis.
In short, the Auto-Preset System is designed to make this hybrid equilibrium tool timeframe-aware — automatically scaling its logic so that the cloud behaves consistently, regardless of chart resolution.
➖
🌐 Hybrid Equilibrium Envelope
The core hybrid midpoint acts as the mean of structural (price) and volumetric (VWAP) balance.
ATR-based bands project natural expansion zones:
🔸+2.226 / –2.226 ATR → inner equilibrium (controlled trend)
*🔸+5.382 / –5.382 ATR → outer volatility extension (over-stretch / reversion zones)
Color-coded fills show regime strength:
* 🟧 Upper Outer (+5.382) – strong bullish expansion
* 🟩 Upper Inner (+2.226) – trending equilibrium
* 🔴 Lower Inner (–2.226) – mild bearish control
* 🟣 Lower Outer (–5.382) – volatility exhaustion
➖
🧭 Higher-Timeframe Framework
Two macro anchors — Price length of 144 and VWAP length of 233 — outline higher-timeframe bias zones. These help confirm when local momentum aligns with (or fades against) long-term structure.
Labels on the right show active lookback values for quick readout:
`$(13) V(21)` → current rolling pair
`$144 / V233` → macro anchors
➖
🧩 Chart Examples
**AMD 15m (Equilibrium Expansion)**
Price steadily rides above the hybrid midpoint as teal and orange (bullish) ATR zones widen, confirming a phase of controlled bullish volatility and healthy trend expansion.
BTCUSD 1m (Volatility Compression)
Bitcoin coils tightly inside the teal-to-maroon equilibrium bands before breaking out.
The hybrid midpoint flattens and ATR envelopes contract, signaling a state of balance before volatility expansion.
ETHUSD 15m (Transition from Compression → Impulse)
Ethereum transitions from purple-zone compression into a clear upper-band expansion.
The hybrid midpoint breaks above the macro VWAP 233, confirming the shift from equilibrium to directional momentum.
SOFI 1m (Micro Bias Reversal)
SOFI’s intraday structure flips as price reclaims the hybrid midpoint.
The macro VWAP 233 flattens, signaling a transition from oversold lower bands back toward equilibrium and early trend recovery.
➖
🎯 How to Use
1. Bias Detection – Price > Hybrid Midpoint → bullish; < → bearish.
2. Volatility Gauge – Watch band spacing for compression / expansion cycles.
3. Confluence Checks – Align Hybrid Midpoint with HTF 233 VWAP for strong continuation signals.
4. Mean Reversion Zones – Outer bands highlight areas where probability of snap-back increases.
➖
🔧 Inputs & Customization
Auto Presets toggle
🔸Manual Lookback Overrides** for fine-tuning
🔸Plot Window Length** (show recent vs full history)
🔸ATR Sensitivity & Fill Opacity** controls
🔸Label Padding / Font Size** for cleaner overlay visuals
➖
🧮 Formula Highlights
➖Rolling Midpoint = (highest(high,N) + lowest(low,N)) / 2
➖Rolling VWAP = Σ(Typical Price×Vol) / Σ(Vol)
➖Hybrid = (PriceMid + VWAP) / 2
➖Upper₂ = Hybrid + ATR×2.226
➖Lower₂ = Hybrid − ATR×2.226
➖Upper₅ = Hybrid + ATR×5.382
➖Lower₅ = Hybrid − ATR×5.382
➖
🎯 Ideal For
➡️ Traders who want adaptive fair-value zones that evolve with both price and volume.
➡️ Analysts who shift between scalping, swing, and position timeframes, and need a tool that self-adjusts.
➡️ Those who rely on visual structure clarity to confirm setups across changing volatility conditions.
➡️ Anyone seeking a hybrid model that unites structural range logic (midpoint) and flow-based balance (VWAP).
➖
🏁 Final Word
This script is more than a visual overlay — it’s a complete trend and structure framework built to adapt with market rhythm. It helps traders visualize equilibrium, momentum, and volatility as one cohesive system. Whether you’re seeking clean trend alignment, dynamic support/resistance, or early warning signs of reversals, this indicator is tuned to help you react with confidence — not hindsight.
➖
Remember — no single indicator should ever stand alone. For best results, pair it with price action context, higher-timeframe structure, and complementary tools such as moving averages or trendlines. Use it to confirm setups, not define them in isolation.
💡 Turn logic into clarity, structure into trades, and uncertainty into confidence.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
🆓 Free scripts:
⚡ Pro scripts: tradingview.com/script/hESCvPuH-Predictive-Volume-MTF-Pro/
🙋♂️ Get help with Pinescript: simplecrypto.life/get-help-with-pinescript
⚡ Pro scripts: tradingview.com/script/hESCvPuH-Predictive-Volume-MTF-Pro/
🙋♂️ Get help with Pinescript: simplecrypto.life/get-help-with-pinescript
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
🆓 Free scripts:
⚡ Pro scripts: tradingview.com/script/hESCvPuH-Predictive-Volume-MTF-Pro/
🙋♂️ Get help with Pinescript: simplecrypto.life/get-help-with-pinescript
⚡ Pro scripts: tradingview.com/script/hESCvPuH-Predictive-Volume-MTF-Pro/
🙋♂️ Get help with Pinescript: simplecrypto.life/get-help-with-pinescript
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.