OPEN-SOURCE SCRIPT
已更新

VWAP Momentum Oscillator

229
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.

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。