OPEN-SOURCE SCRIPT
MACD Pro

The MACD Pro is a modern take on the classic MACD, designed to give traders deeper insights into market momentum, trend conditions, and potential turning points. While it keeps the standard MACD foundation, it introduces a few enhancements to make it more adaptive and visually intuitive.
At its core, the indicator calculates the traditional MACD line, Signal line and Histogram. The histogram can be optionally displayed.
One of the things that set this version apart is the addition of the MACD Leader, an optional feature that makes the MACD more responsive to price action. By applying an adaptive smoothing factor (Leader Sensitivity), the Leader line can provide earlier momentum cues compared to the standard MACD and help anticipate shifts before they become obvious on a standard MACD indicator.
Another enhancement is the regime-based color system for the MACD line. Instead of simply coloring based on the MACD or histogram itself, this indicator identifies the overall market regime using momentum and trend strength conditions.
Bullish Regime: Momentum is positive and trend strength is above average.
Bearish Regime: Momentum is negative and trend strength is above average.
Sideways Regime: Momentum remains weak and within noise levels.
This regime detection allows the MACD line to visually adapt, giving traders an extra layer of context beyond standard MACD signals to blend momentum analysis with market conditions, helping distinguish between trending and ranging environments.
At its core, the indicator calculates the traditional MACD line, Signal line and Histogram. The histogram can be optionally displayed.
One of the things that set this version apart is the addition of the MACD Leader, an optional feature that makes the MACD more responsive to price action. By applying an adaptive smoothing factor (Leader Sensitivity), the Leader line can provide earlier momentum cues compared to the standard MACD and help anticipate shifts before they become obvious on a standard MACD indicator.
Another enhancement is the regime-based color system for the MACD line. Instead of simply coloring based on the MACD or histogram itself, this indicator identifies the overall market regime using momentum and trend strength conditions.
Bullish Regime: Momentum is positive and trend strength is above average.
Bearish Regime: Momentum is negative and trend strength is above average.
Sideways Regime: Momentum remains weak and within noise levels.
This regime detection allows the MACD line to visually adapt, giving traders an extra layer of context beyond standard MACD signals to blend momentum analysis with market conditions, helping distinguish between trending and ranging environments.
Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.
Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.