OPEN-SOURCE SCRIPT

Indexed MACD Oscillator

111
Indexed MACD Oscillator — A normalized version of the standard MACD histogram, rescaled to always oscillate between 0 and 100 (rather than fluctuating in raw price-difference units, which vary a lot by symbol/timeframe). It calculates the standard MACD (12/26 EMA) and signal line (9-period EMA of MACD), takes the histogram (MACD − Signal), then min-max normalizes it using the highest and lowest histogram values over the trailing 100 bars. The result: 0 represents the most bearish momentum reading in the lookback window, 100 represents the most bullish, and the two gray reference lines mark those bounds.
This effectively turns MACD histogram into an oscillator similar in spirit to Stochastic or RSI — useful for comparing momentum extremes across different symbols on a consistent 0–100 scale, since raw MACD histogram values aren't comparable between, say, a $30 stock and a $3,000 stock.
One thing worth flagging for the description/documentation: since the normalization uses a rolling 100-bar high/low, the 0 and 100 levels are relative to recent history, not fixed absolute thresholds — a reading of 100 today doesn't necessarily mean the same momentum strength as a 100 from three months ago, since the window is constantly sliding. Might be worth a line in the description clarifying that it's a relative momentum extremity measure, not an absolute one, so users don't misread it like a fixed RSI-style overbought/oversold level.

Aviso legal

As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.