OPEN-SOURCE SCRIPT
MACD-v Bullish/Bearish Divergence

MACD-v Bullish/Bearish Divergence
Overview This indicator is a specialized divergence detector based on the MACD-v (Volatility Normalized Momentum) concept. Unlike standard MACD which uses absolute price differences, MACD-v normalizes values against volatility (ATR), allowing for fixed, universal Overbought/Oversold thresholds across all assets and timeframes.
Recommendation: This script is highly effective when paired with the original MACD-v by Alex Spiroglou. While this indicator focuses on identifying and visualizing divergence entries, using the original oscillator alongside it provides the best visual context for the overall momentum structure.
How It Works
This tool uses a dual-signal mechanism (Raw Line + Signal Smooth) to identify specific divergence setups:
Important Note: Momentum Washout
The colored background persists as long as the divergence trade remains valid. Traders should note the concept of "Momentum Washout":
Strategy Recommendation: Multi-Timeframe Analysis
Divergence signals are most powerful when confirmed across timeframes. It is highly recommended to look for alignment before taking a trade:
Visual Guide
🔵 Blue Dot: Bullish Divergence Setup (Watch for entry).
🟢 Green Dot: Bullish Divergence Trigger (Long Entry).
🟡 Yellow Dot: Bearish Divergence Setup (Watch for entry).
🔴 Red Dot: Bearish Divergence Trigger (Short Entry).
Background Color: Indicates an active trade (Red = Bearish / Green = Bullish).
Settings
Disclaimer: This tool is for educational purposes and trend analysis only. Always manage your risk appropriately.
Overview This indicator is a specialized divergence detector based on the MACD-v (Volatility Normalized Momentum) concept. Unlike standard MACD which uses absolute price differences, MACD-v normalizes values against volatility (ATR), allowing for fixed, universal Overbought/Oversold thresholds across all assets and timeframes.
Recommendation: This script is highly effective when paired with the original MACD-v by Alex Spiroglou. While this indicator focuses on identifying and visualizing divergence entries, using the original oscillator alongside it provides the best visual context for the overall momentum structure.
How It Works
This tool uses a dual-signal mechanism (Raw Line + Signal Smooth) to identify specific divergence setups:
- Setup (Yellow/Blue Dots): Identifies when price momentum has extended significantly into extreme zones (Overbought/Oversold).
- Trigger (Red/Green Dots): Fires when price fails to make a new momentum extreme despite price action (classic divergence/failure swing).
- Active State (Background Color): Once a trigger fires, the background highlights (Red for Bearish, Green for Bullish) to indicate an active divergence play.
- Reset (Exit): The signal state clears when momentum returns to the neutral "safe zone."
Important Note: Momentum Washout
The colored background persists as long as the divergence trade remains valid. Traders should note the concept of "Momentum Washout":
- Signal End: The background color turns off when the MACD returns to the neutral range, indicating the primary high-velocity impulse is over.
- Performance Continuation: Significant positive or negative price performance can often continue even after the background signal ends. This period allows the remaining momentum to "wash out" or drift before the next major impulse.
- Strategy Tip: The indicator is designed to capture the high-volatility portion of the reversal. Do not assume the end of the signal is the absolute top or bottom of the trend; it simply marks the normalization of momentum.
Strategy Recommendation: Multi-Timeframe Analysis
Divergence signals are most powerful when confirmed across timeframes. It is highly recommended to look for alignment before taking a trade:
- Trend Confirmation: If you see a signal on a lower timeframe (e.g., 5m or 15m), check a higher timeframe (e.g., 1H or 4H). A bullish divergence on the 5m is significantly more reliable if the 1H momentum is already bullish or oversold.
- Signal Stacking: Valid signals often appear sequentially—first on the 1m, then the 5m, and finally the 15m. Waiting for this "cascade" can filter out false reversals.
Visual Guide
🔵 Blue Dot: Bullish Divergence Setup (Watch for entry).
🟢 Green Dot: Bullish Divergence Trigger (Long Entry).
🟡 Yellow Dot: Bearish Divergence Setup (Watch for entry).
🔴 Red Dot: Bearish Divergence Trigger (Short Entry).
Background Color: Indicates an active trade (Red = Bearish / Green = Bullish).
Settings
- Auto-Detect: Automatically switches between Scalping settings (tighter thresholds) for low timeframes and Swing settings for high timeframes.
- Strict Invalidation: If enabled, cancels a setup if momentum pushes too far in the opposite direction before triggering.
- Active Signal Multiplier: Dynamically smooths the signal line only when a trade is active to prevent premature exits during choppy corrections.
Disclaimer: This tool is for educational purposes and trend analysis only. Always manage your risk appropriately.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.