OPEN-SOURCE SCRIPT
מעודכן

VWAP Momentum Oscillator

989
How It Works

Core Calculation Method
The oscillator combines four key market measurements into a single, normalized reading:

1. Price-VWAP Deviation: `(Close - VWAP) / VWAP × 100`
2. VWAP-MA Momentum: `(VWAP - MovingAverage) / MovingAverage × 100`
3. Anchored VWAP Strength: Average of high/low anchor deviations from rolling VWAP
4. Range Position: `(Close - PeriodLow) / (PeriodHigh - PeriodLow) × 100 - 50`

Dynamic Signal Line
The signal line uses an EMA that automatically adjusts its length based on your chart timeframe:
- Futures: Always covers 23 hours of trading (1,380 minutes)
- Stocks: Always covers 6.5 hours of trading (390 minutes)
- Examples: 276 periods on 5-min futures chart, 1,380 periods on 1-min futures chart

Trading Signals

🟢 Buy Signals
- Condition: Main oscillator crosses above signal line while below zero
- Logic: Momentum turning bullish from oversold conditions
- Visual: Green "BUY" label below price action

🔴 Sell Signals
- Condition: Main oscillator crosses below signal line while above zero
- Logic: Momentum turning bearish from overbought conditions
- Visual: Red "SELL" label above price action

⚠️ Extreme Warnings
- Extreme Overbought: Red triangle when oscillator crosses above +4.0
- Extreme Oversold: Green triangle when oscillator crosses below -4.0
- Purpose: Risk management alerts, not entry/exit signals

Oscillator Zones

Interpretation Guide
- Above +2.0: Strong bullish momentum zone (green background)
- 0 to +2.0: Mild bullish territory
- 0 to -2.0: Mild bearish territory
- Below -2.0: Strong bearish momentum zone (red background)
- Above +4.0: Extreme overbought (caution advised)
- Below -4.0: Extreme oversold (potential reversal zone)

Customization Options

Moving Average Settings
- EMA/SMA Toggle: Choose between exponential or simple moving average
- Color Customization: Adjust MA line color and width

Visual Controls
- Bullish/Bearish Colors: Customize momentum zone colors
- Signal Line: Toggle visibility and adjust color
- Line Widths: Control thickness of all plot lines

Anchor Modes
- NY Session Only: Anchors reset at NY market open (9:30 AM ET)
- 24H NY Day: Anchors reset at NY calendar day change (midnight ET)

Best Practices

Timeframe Selection
- Scalping: 1-5 minute charts for quick momentum changes
- Day Trading: 5-15 minute charts for clearer trend signals
- Swing Trading: 1-4 hour charts for major momentum shifts

Signal Confirmation
- Wait for crossovers: Don't trade on oscillator position alone
- Respect extreme levels: Exercise caution above +4 or below -4
- Use with price action: Combine with support/resistance levels

Risk Management
- Extreme zones: Reduce position size when oscillator is extended
- Failed signals: Exit quickly if momentum doesn't follow through
- Market context: Consider overall trend direction and market volatility

Technical Specifications

Calculation Components
- Base Length: 1,380 periods (futures) / 390 periods (stocks)
- Signal Line: Dynamic EMA covering one full trading day
- Smoothing: 3-period SMA on raw oscillator (adjustable)
- Update Frequency: Real-time on every price tick

Performance Notes
- Resource Efficient: Optimized calculations minimize CPU usage
- Memory Friendly: Uses incremental VWAP calculations
- Fast Loading: Minimal historical data requirements

Version History & Development

This oscillator evolved from advanced VWAP overlay strategies, transforming complex multi-line analysis into a single, actionable momentum gauge. The indicator maintains the sophistication of institutional VWAP analysis while providing the clarity needed for retail trading decisions.

Core Philosophy
Traditional VWAP indicators show where price is relative to volume-weighted averages, but they don't quantify momentum or provide clear entry/exit signals. This oscillator solves that problem by normalizing all VWAP relationships into a single, bounded indicator that works consistently across all timeframes and asset classes.

---

Open Source License: This indicator is provided free for the TradingView community. Feel free to modify and enhance according to your trading needs.
הערות שחרור
How It Works

Core Calculation Method
The oscillator combines four key market measurements into a single, normalized reading:

1. Price-VWAP Deviation: `(Close - VWAP) / VWAP × 100`
2. VWAP-MA Momentum: `(VWAP - MovingAverage) / MovingAverage × 100`
3. Anchored VWAP Strength: Average of high/low anchor deviations from rolling VWAP
4. Range Position: `(Close - PeriodLow) / (PeriodHigh - PeriodLow) × 100 - 50`

Dynamic Signal Line
The signal line uses an EMA that automatically adjusts its length based on your chart timeframe:
- Futures: Always covers 23 hours of trading (1,380 minutes)
- Stocks: Always covers 6.5 hours of trading (390 minutes)
- Examples: 276 periods on 5-min futures chart, 1,380 periods on 1-min futures chart

Trading Signals

🟢 Buy Signals
- Condition: Main oscillator crosses above signal line while below zero
- Logic: Momentum turning bullish from oversold conditions
- Visual: Green "BUY" label below price action

🔴 Sell Signals
- Condition: Main oscillator crosses below signal line while above zero
- Logic: Momentum turning bearish from overbought conditions
- Visual: Red "SELL" label above price action

⚠️ Extreme Warnings
- Extreme Overbought: Red triangle when oscillator crosses above +4.0
- Extreme Oversold: Green triangle when oscillator crosses below -4.0
- Purpose: Risk management alerts, not entry/exit signals

Oscillator Zones

Interpretation Guide
- Above +2.0: Strong bullish momentum zone (green background)
- 0 to +2.0: Mild bullish territory
- 0 to -2.0: Mild bearish territory
- Below -2.0: Strong bearish momentum zone (red background)
- Above +4.0: Extreme overbought (caution advised)
- Below -4.0: Extreme oversold (potential reversal zone)

Customization Options

Moving Average Settings
- EMA/SMA Toggle: Choose between exponential or simple moving average
- Color Customization: Adjust MA line color and width

Visual Controls
- Bullish/Bearish Colors: Customize momentum zone colors
- Signal Line: Toggle visibility and adjust color
- Line Widths: Control thickness of all plot lines

Anchor Modes
- NY Session Only: Anchors reset at NY market open (9:30 AM ET)
- 24H NY Day: Anchors reset at NY calendar day change (midnight ET)

Best Practices

Timeframe Selection
- Scalping: 1-5 minute charts for quick momentum changes
- Day Trading: 5-15 minute charts for clearer trend signals
- Swing Trading: 1-4 hour charts for major momentum shifts

Signal Confirmation
- Wait for crossovers: Don't trade on oscillator position alone
- Respect extreme levels: Exercise caution above +4 or below -4
- Use with price action: Combine with support/resistance levels

Risk Management
- Extreme zones: Reduce position size when oscillator is extended
- Failed signals: Exit quickly if momentum doesn't follow through
- Market context: Consider overall trend direction and market volatility

Technical Specifications

Calculation Components
- Base Length: 1,380 periods (futures) / 390 periods (stocks)
- Signal Line: Dynamic EMA covering one full trading day
- Smoothing: 3-period SMA on raw oscillator (adjustable)
- Update Frequency: Real-time on every price tick

Performance Notes
- Resource Efficient: Optimized calculations minimize CPU usage
- Memory Friendly: Uses incremental VWAP calculations
- Fast Loading: Minimal historical data requirements

Version History & Development

This oscillator evolved from advanced VWAP overlay strategies, transforming complex multi-line analysis into a single, actionable momentum gauge. The indicator maintains the sophistication of institutional VWAP analysis while providing the clarity needed for retail trading decisions.

Core Philosophy
Traditional VWAP indicators show where price is relative to volume-weighted averages, but they don't quantify momentum or provide clear entry/exit signals. This oscillator solves that problem by normalizing all VWAP relationships into a single, bounded indicator that works consistently across all timeframes and asset classes.

---

Open Source License: This indicator is provided free for the TradingView community. Feel free to modify and enhance according to your trading needs.
הערות שחרור
Improved alert capability - All Conditions Alert Enabled in the UI
הערות שחרור
Latest Release Addition:

Alert Time Filter (NY time)
Adds a dropdown that gates signals/alerts to specific New York session windows:

No Filter – alerts any time.

NY Session Only – 09:30–16:00 ET.

NY Session – Excl. First 15 – 09:45–16:00 ET.

NY Session – Excl. First 30 – 10:00–16:00 ET.

When a window is selected, both alerts and on-chart BUY/SELL markers only fire/render inside that window (America/New_York). Alert messages are fixed strings to satisfy Pine’s constant-string rule.
הערות שחרור
Modified plot shape
הערות שחרור
🧭 VWAP Momentum Oscillator (Pro • Range Violations + Signal Invalidation)
🎯 Overview

The VWAP Momentum Oscillator (Pro) is a momentum-based indicator that measures the strength and direction of price relative to VWAP, session anchors, and higher-timeframe trend filters.
It is built for traders who want high-quality, session-aware trade signals with full alert customization.

⚙️ Core Features

Adaptive VWAP-anchored momentum oscillator

Session-aware anchoring (NY Session or 24H)

Dynamic signal line smoothing (Auto or Fixed)

Trend & ADX confirmation filters for cleaner entries

Price-action-mitigated OB/OS detection (no blind reversals)

Signal invalidation tracking before directional confirmation

Full user-controlled alert system — choose which events matter

NY Session filters to avoid overnight noise

Smart visual design: color-coded histogram, adaptive backgrounds, and labeled events

🧩 Signal Types
Signal Description Label
Bullish Crossover Oscillator crosses above signal line (up momentum) BUY
Bearish Crossunder Oscillator crosses below signal line (down momentum) SELL
Extreme Overbought / Oversold Oscillator exceeds ±4 thresholds Color zones
OB/OS Range Break Price violates initiating OB/OS bar wick or close “X” marker
Signal Invalidation Structure fails before breakout confirmation White dot
🧠 Logic Summary

The oscillator blends:

Price-to-VWAP deviation (%)

VWAP-to-1D-MA deviation (%)

Anchored VWAP High/Low ratios

Price position within current session range

Signals are confirmed only when:

Momentum magnitude ≥ threshold

Trend alignment (VWAP + HTF EMA) confirmed

ADX ≥ strength filter

Price breaks prior structure (optional)

This avoids weak reversals and fake crossovers.

🧰 Alert System Guide

You have full control:

Enable All Alerts → Master switch

Individual checkboxes for each signal type

Optional “Any Selected Signal” alert — fires when any enabled signal occurs

Session filters let you run alerts:

No Filter – 24h

NY Session Only – 09:30–16:00 ET

Excl. First 15/30min – avoid open volatility

🕓 Note: TradingView alerts use a snapshot of your selections when created.
If you later change checkboxes, you must edit or recreate the alert for updates to take effect.

⚖️ Example Setup

Scalping NY session with clean momentum only:

Anchor Mode → NY Session Only

Cross Method → Osc vs Signal

Require Trend Alignment → ✅

ADX ≥ 20 → ✅

Time Filter → NY Session Only

Enable Alerts → Bullish & Bearish Cross

Create alert on Any Selected Signal

Result: only high-quality crossovers aligned with VWAP and trend.

💡 Pro Tips

For higher accuracy, keep both Trend Alignment and ADX filters on.

For faster signals, disable them — but expect more noise.

Use Cooldown (bars) to prevent over-triggering in chop.

Invalidation dots = warning that structure broke before follow-through.

🧾 Version History

vPro (Latest)

Added per-signal alert toggles

Added composite “Any Selected Signal” alert

Enhanced OB/OS violation logic

Added ADX and trend confirmation filters

Improved visuals & reduced repaint potential

⚠️ Disclaimer

This indicator is for educational purposes only.
It does not constitute financial advice. Always confirm trades using your own risk-management and discretion.

כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.