OPEN-SOURCE SCRIPT
업데이트됨 MACD Slope & Swing Monitor

This script is not just another MACD. It is a highly specialized momentum engine designed to quantify trend exhaustion and visualize structural pivots, making it the perfect tool for trading advanced concepts like the "Anti-Setup" (popularized by Linda Raschke) and Hidden Divergences.
While standard MACD shows you the current momentum, it often lags during complex corrections (like Elliott Wave 4th waves or Flat corrections). This indicator solves this by introducing real-time Slope Quantification and past Swing Pivot Detection.
Key Features & The Logic Behind the Mashup:
Dynamic Slope Quantification: Calculates the exact rate of change (Slope) for both the MACD and Signal lines over a user-defined lookback period. This allows traders to spot momentum decay before an actual crossover occurs. The exact values are displayed on a clean, dynamic label that tracks the current bar.
Structural Swing Detection (Pivots): Uses a 5-bar left/right lookback to plot Swing Highs and Lows directly on the oscillator. By locking these markers to the top and bottom of the pane, the script keeps the MACD lines perfectly clean. This is crucial for instantly identifying Hidden Divergences against previous structural peaks.
Custom MA Engine: Unlike standard built-in MACD, this script allows you to independently change the Moving Average type (SMA, EMA, WMA, RMA) for both the Oscillator and the Signal line. (e.g., using EMA for the oscillator and SMA for the signal to refine trade timing).
How to Use:
Trend Continuation (Hidden Divergence): Look for price to make a Lower High / Higher Low, while the MACD Swing markers show a Higher High / Lower Low.
The "Anti" Trigger: Wait for the MACD Slope to sharply reverse back toward the Signal line in the direction of the primary trend. The real-time label will confirm the momentum shift mathematically before the visual hook forms.
While standard MACD shows you the current momentum, it often lags during complex corrections (like Elliott Wave 4th waves or Flat corrections). This indicator solves this by introducing real-time Slope Quantification and past Swing Pivot Detection.
Key Features & The Logic Behind the Mashup:
Dynamic Slope Quantification: Calculates the exact rate of change (Slope) for both the MACD and Signal lines over a user-defined lookback period. This allows traders to spot momentum decay before an actual crossover occurs. The exact values are displayed on a clean, dynamic label that tracks the current bar.
Structural Swing Detection (Pivots): Uses a 5-bar left/right lookback to plot Swing Highs and Lows directly on the oscillator. By locking these markers to the top and bottom of the pane, the script keeps the MACD lines perfectly clean. This is crucial for instantly identifying Hidden Divergences against previous structural peaks.
Custom MA Engine: Unlike standard built-in MACD, this script allows you to independently change the Moving Average type (SMA, EMA, WMA, RMA) for both the Oscillator and the Signal line. (e.g., using EMA for the oscillator and SMA for the signal to refine trade timing).
How to Use:
Trend Continuation (Hidden Divergence): Look for price to make a Lower High / Higher Low, while the MACD Swing markers show a Higher High / Lower Low.
The "Anti" Trigger: Wait for the MACD Slope to sharply reverse back toward the Signal line in the direction of the primary trend. The real-time label will confirm the momentum shift mathematically before the visual hook forms.
릴리즈 노트
Update: Adjustable Pivot Sensitivity & Dashboard UIIn this update, I have refined the visual clarity and added customization options to help you better adapt to different market volatilities.
1. Adjustable Swing Pivot Sensitivity (Noise Filter)
You can now fully customize the lookback period (Left and Right Bars) for Swing High/Low detection directly from the settings menu.
The default lookback has been increased from 5 to 7. This provides a stronger filter against minor market noise, allowing you to focus purely on major structural swings for higher-probability Hidden Divergence and "Anti" setups.
The marker offset now dynamically adapts to your chosen right-bar period, ensuring perfect visual alignment on the chart.
2. Fixed Dashboard UI (Slope Monitor)
Upgraded the real-time Slope Monitor display. Instead of a floating label that follows the last candle, the exact slope values are now locked into a clean, fixed Table Dashboard (Top Right).
This keeps the MACD oscillator completely free of clutter, giving you a pure view of the momentum waves while the crucial numbers remain constantly visible in your peripheral vision.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.