STC Indicator - A Better MACD
Aug 29, 2018

The [SHK] Schaff Trend Cycle (STC) indicator provides a refined trend-following oscillator that combines the benefits of the MACD and Slow Stochastics to identify market cycles with reduced lag. By applying a cycle component to moving averages, it aims to deliver more responsive signals for trend detection and potential reversals compared to traditional MACD implementations.
Usage
The Usage section describes how the script can be used, examples should be provided in this section. This section also focuses on how main settings affect the indicator interpretation and output.
- Trend Identification: The indicator oscillates between 0 and 100. A rising line, typically colored green, suggests a bullish trend cycle, while a falling line, typically colored red, suggests a bearish trend cycle.
- Overbought/Oversold Reversals: Traders often look for reversals occurring within extreme zones. A bullish reversal signal may be identified when the indicator turns upward while below the 25 level. Conversely, a bearish reversal may be identified when the indicator turns downward while above the 75 level.
- Early Signal Detection: Because the STC incorporates a smoothing factor and stochastic logic, it often reacts to price changes faster than a standard MACD signal line crossover, allowing for earlier entries or exits in trending markets.
Details
The STC was developed by Doug Schaff and operates on the premise that currency and equity trends move in cyclical patterns. The script execution follows these primary steps:
- MACD Calculation: It first calculates a standard MACD (Moving Average Convergence Divergence) using the fast and slow length inputs.
- Stochastic Processing: It applies a %K stochastic calculation to the MACD values over a specific length. This identifies where the current MACD sits relative to its recent high/low range.
- Smoothing: A smoothing factor (exponential moving average logic) is applied to the resulting stochastic values to reduce noise.
- Double Smoothing: The process is repeated—applying another stochastic calculation and a final smoothing pass—to create the final STC oscillator value.
Settings
- Length: The lookback period used for the stochastic calculations. A higher value results in a slower, smoother oscillator, while a lower value increases sensitivity.
- FastLength: The period for the fast Exponential Moving Average (EMA) used in the underlying MACD calculation.
- SlowLength: The period for the slow Exponential Moving Average (EMA) used in the underlying MACD calculation.
- Factor: The smoothing constant applied to the stochastic results. This controls the responsiveness of the indicator; higher values make it more reactive to recent price changes.
FAQ
What is the difference between STC and MACD? The STC uses a stochastic algorithm applied to the MACD values, which allows it to reach overbought and oversold extremes more quickly while filtering out minor price fluctuations that might cause false signals in a standard MACD.
How do I interpret the color changes on the line? The color changes represent the immediate slope of the oscillator. A green line indicates the STC value is higher than the previous bar (increasing momentum), whereas a red line indicates the value is lower than the previous bar (decreasing momentum).
How can I access the [SHK] Schaff Trend Cycle (STC) tool? 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.