KST-Based MACD
Apr 9, 2023

The KST-Based MACD indicator provides a modified Moving Average Convergence Divergence oscillator built upon the Know Sure Thing (KST) momentum oscillator to offer enhanced macro-trend analysis and long-term divergence identification.
Usage
The KST-Based MACD is primarily designed for macro-level analysis rather than precision entry and exit timing. Due to the multi-layered smoothing of the underlying KST calculation, the indicator is inherently lagging, which serves to filter out market noise in favor of definitive trend confirmations.
- Histogram Analysis: The histogram provides the earliest signs of trend shifts. A change in color or a slope reversal in the histogram often precedes line crossovers, acting as a preliminary signal.
- MACD-Signal Crossovers: A crossover between the MACD line and the Signal line represents a secondary, more definitive confirmation of a trend change.
- Divergence Identification: This tool is particularly effective for spotting long-term divergences on higher timeframes where standard oscillators like the RSI or traditional MACD may produce frequent false signals or excessive volatility.
- Ribbon Visualization: The integrated ribbon (composed of multiple EMAs of the MACD) helps visualize the strength and speed of the momentum shift.
Details
The indicator calculates the Know Sure Thing (KST) oscillator, which is a weighted sum of four different Rate of Change (ROC) periods smoothed by moving averages. It then applies the MACD formula (Fast MA - Slow MA) to this KST value rather than the raw price.
A unique feature is the "Exotic Calculations" mode. This allows the indicator to function effectively on both linear/negative charts (such as yield spreads like the T10Y2Y) and logarithmic charts (such as the SPX) by utilizing logarithmic transformations in the ROC calculations.
Settings
KST Settings
- ROC Lengths (#1 - #4): Sets the periods for the four Rate of Change components.
- SMA Lengths (#1 - #4): Sets the smoothing periods for each corresponding ROC component.
- Source: The price source used for calculations (default is Close).
- Method: Choose between SMA or EMA for the internal KST smoothing.
- Exotic Calculations: Enables logarithmic ROC calculations for non-standard or highly volatile scales.
MACD Settings
- Fast Length: The period for the shorter moving average of the KST.
- Slow Length: The period for the longer moving average of the KST.
- Signal Smoothing: The smoothing period for the Signal line.
- Oscillator MA Type: Selects the MA type (SMA/EMA) for the MACD line components.
- Signal Line MA Type: Selects the MA type (SMA/EMA) for the Signal line smoothing.
Ribbon Settings
- EMA periods (1 - 8): Individual period settings for the eight EMAs that constitute the visual ribbon area.
FAQ
How do I interpret the lag in the KST-Based MACD?
The lag is intentional and designed to confirm long-term macro trends. While crossovers occur later than traditional oscillators, they often signal more significant, sustained market moves.
What are Exotic Calculations used for?
Exotic Calculations use logarithmic math to ensure the indicator remains accurate when used on instruments with negative values (like spreads) or assets charted on log scales.
How can I access this indicator?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.