OPEN-SOURCE SCRIPT
Momentum Divergence Oscillator by JJ

Momentum Divergence Oscillator by JJ
A powerful, all-in-one momentum tool designed to streamline trade confluence, combining multi-timeframe trend analysis with automatic divergence spotting and classic MACD signals.
How to Use This Indicator
This oscillator is designed to be used in the lower pane of your chart, beneath your primary price chart. It provides three main types of signals:
1. Multi-Timeframe (MTF) Trend Confirmation
The background shading is your primary trend filter. It looks at the MACD trend on two higher timeframes (30m and 60m by default) to confirm the market's overarching direction.
Green Shading: Indicates that both higher timeframes are in a bullish trend (MACD above signal line). Focus on looking for BUY signals during this time.
Red Shading: Indicates that both higher timeframes are in a bearish trend. Focus on looking for SELL signals during this time.
Grey/No Shading: The higher timeframes are not in agreement or are consolidating. Exercise caution or stick to standard price action rules.
2. Automatic Divergence Signals
Divergence is a powerful early warning system where the indicator moves in the opposite direction of the price. The indicator automatically flags these occurrences:
"Bull RSI Div" (Green Label-Up): Bullish divergence identified using the RSI oscillator. This suggests a potential reversal to the upside after a downtrend.
"Bear RSI Div" (Red Label-Down): Bearish divergence identified using the RSI oscillator. This suggests a potential reversal to the downside after an uptrend.
Tip: These signals are often most reliable when they occur within the corresponding MTF background colour (e.g., a "Bull RSI Div" during a Green MTF background).
3. Momentum Shifts and Crossovers
The standard plots provide immediate insight into market momentum:
Blue/Orange Lines: The traditional MACD line (Blue) and Signal line (Orange).
Histogram (Green/Red Bars): Represents the momentum difference between the MACD and Signal lines.
Zero-Line Crosses (Triangles): Tiny triangles appear when the MACD line crosses the zero line, indicating a shift in long-term momentum.
Peaks & Troughs (X-Crosses): The 'X' markers identify local peaks and troughs in the histogram, sometimes indicating short-term exhaustion of the current move.
Disclaimer: Trading involves significant risk and is not suitable for every investor. This indicator is for educational purposes only and should not be considered financial advice. Always use appropriate risk management.
A powerful, all-in-one momentum tool designed to streamline trade confluence, combining multi-timeframe trend analysis with automatic divergence spotting and classic MACD signals.
How to Use This Indicator
This oscillator is designed to be used in the lower pane of your chart, beneath your primary price chart. It provides three main types of signals:
1. Multi-Timeframe (MTF) Trend Confirmation
The background shading is your primary trend filter. It looks at the MACD trend on two higher timeframes (30m and 60m by default) to confirm the market's overarching direction.
Green Shading: Indicates that both higher timeframes are in a bullish trend (MACD above signal line). Focus on looking for BUY signals during this time.
Red Shading: Indicates that both higher timeframes are in a bearish trend. Focus on looking for SELL signals during this time.
Grey/No Shading: The higher timeframes are not in agreement or are consolidating. Exercise caution or stick to standard price action rules.
2. Automatic Divergence Signals
Divergence is a powerful early warning system where the indicator moves in the opposite direction of the price. The indicator automatically flags these occurrences:
"Bull RSI Div" (Green Label-Up): Bullish divergence identified using the RSI oscillator. This suggests a potential reversal to the upside after a downtrend.
"Bear RSI Div" (Red Label-Down): Bearish divergence identified using the RSI oscillator. This suggests a potential reversal to the downside after an uptrend.
Tip: These signals are often most reliable when they occur within the corresponding MTF background colour (e.g., a "Bull RSI Div" during a Green MTF background).
3. Momentum Shifts and Crossovers
The standard plots provide immediate insight into market momentum:
Blue/Orange Lines: The traditional MACD line (Blue) and Signal line (Orange).
Histogram (Green/Red Bars): Represents the momentum difference between the MACD and Signal lines.
Zero-Line Crosses (Triangles): Tiny triangles appear when the MACD line crosses the zero line, indicating a shift in long-term momentum.
Peaks & Troughs (X-Crosses): The 'X' markers identify local peaks and troughs in the histogram, sometimes indicating short-term exhaustion of the current move.
Disclaimer: Trading involves significant risk and is not suitable for every investor. This indicator is for educational purposes only and should not be considered financial advice. Always use appropriate risk management.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.