Systemicbeta

Schaff Trend Cycle

systemic:core-stcIndicators

Inputs

NameTypeDescription
Slow WindowWhole numberThe window, in bars, of the long (slow) EMA in the MACD calculation.
Fast WindowWhole numberThe window, in bars, of the short (fast) EMA in the MACD calculation.
CycleWhole numberThe look-back window, in bars, of the two stochastic calculations applied to the MACD.
First Smooth FactorNumberThe window, in bars, of the EMA that smooths the first stochastic calculation.
Second Smooth FactorNumberThe window, in bars, of the EMA that smooths the second stochastic calculation (the final output).
Price DataNumber seriesThe price series used to calculate the MACD inside the STC.

Outputs

NameTypeDescription
STCNumber seriesThe Schaff Trend Cycle oscillator value, from 0 to 100.

Cost

6
credits per run
1,000
bars

0.212 + 0.00565·n credits for n bars, rounded up. The marks are each plan's limit of bars.

The Speed Problem

In the 1990s, currency trader Doug Schaff had a problem that many technical analysts know: the MACD was too slow. When it confirmed a trend, much of the move had already passed.

Schaff's idea: Why not apply the stochastic calculation to MACD itself? The stochastic oscillator measures where a value sits within its recent range. Applied twice in a row, it turns the slow MACD into a faster, bounded oscillator.

The result was the Schaff Trend Cycle, a hybrid indicator designed for fast forex markets, where early trend detection matters.


The Double Stochastic: Core Innovation

The core of the STC is its double stochastic smoothing:

flowchart TD
    subgraph Step1["Step 1: Calculate MACD"]
        Fast["Fast EMA (23)"]
        Slow["Slow EMA (50)"]
        MACD["MACD = Fast - Slow"]
    end
    
    subgraph Step2["Step 2: First Stochastic"]
        S1["Where is MACD within its range?"]
        PF["Percent F (smoothed)"]
    end
    
    subgraph Step3["Step 3: Second Stochastic"]
        S2["Where is Percent F within its range?"]
        STC["STC (0-100)"]
    end
    
    Fast & Slow --> MACD --> S1 --> PF --> S2 --> STC

Why does this work?

  1. MACD captures trend momentum (but it is unbounded and slow)
  2. First stochastic scales MACD to 0-100 and makes its turns faster
  3. Second stochastic smooths further and keeps the speed

The result oscillates between 0 and 100, with faster trend detection than the raw MACD.


Interpretation

STC ZoneReadingMarket Implication
Bullish75-100Strong uptrend; potential overbought
Neutral25-75Transition; trend developing or fading
Bearish0-25Strong downtrend; potential oversold

⚠️ Important: Unlike RSI, values that stay in an extreme zone (>75 or <25) often confirm a strong trend and do not warn of a reversal. Exit signals come when STC leaves these zones.


Trading Signals

Threshold Crossovers

SignalConditionInterpretation
BuySTC crosses above 25Leaving oversold; uptrend starting
SellSTC crosses below 75Leaving overbought; downtrend starting

Trend Confirmation

STC BehaviorWhat It Means
Holding > 75Strong uptrend in progress
Holding < 25Strong downtrend in progress
Oscillating 25-75Ranging market; use caution

Speed Advantage Over MACD

flowchart LR
    subgraph MACD_Signal["MACD Signal"]
        M1["Trend begins"]
        M2["MACD crosses signal line"]
        M3["Signal confirmed"]
    end
    
    subgraph STC_Signal["STC Signal"]
        S1["Trend begins"]
        S2["STC crosses 25/75"]
        S3["Earlier entry"]
    end
    
    M1 -->|"Lag"| M2 --> M3
    S1 -->|"Less lag"| S2 --> S3

STC often signals a trend change a few bars earlier than a MACD crossover.


Inputs

InputTypical valuePurpose
Slow Window50Window of the long EMA in the MACD
Fast Window23Window of the short EMA in the MACD
Cycle10Look-back window of both stochastics
First Smooth Factor3EMA window that smooths the first stochastic
Second Smooth Factor3EMA window that smooths the second stochastic

The module has no built-in defaults: you set all five values.

Input Tuning

  • Shorter cycle (5-8): Faster signals, more noise
  • Longer cycle (12-20): Smoother, more lag
  • Smoothing factors: Higher = smoother but slower

When STC Excels

  • Strong trending markets — Catches trends early and stays with them
  • Forex and crypto — Designed for fast-moving, 24-hour markets
  • Swing trading — 4-hour and daily bars
  • Trend confirmation — As a filter alongside other indicators

When STC Struggles

  • Ranging or choppy markets — Oscillates without clear direction
  • Very short periods — Noise can hide the signals
  • Low-volatility assets — May produce false signals
  • Fundamental-driven moves — News events ignore technical levels

Missing Data

Gaps in price_data (closed-market weekends and holidays, missing prices) give an empty STC. No value is filled in or carried across the gap:

ScenarioOutput
Closed-market gapEmpty on that bar. Every step of the calculation (both MACD EMAs, both stochastics over cycle bars, both smoothing EMAs) continues from the last bar that had a price, as if the bars were neighbors
Warm-up (not yet enough bars for every step)Empty. The number of empty bars is the longer of Slow Window and Fast Window, plus 2 × Cycle, plus both smooth factors, minus 5. With 50, 23, 10, 3 and 3 that is 71 bars
All bars missingEvery bar is empty
Too few barsThe run fails if Slow Window, Fast Window or Cycle is larger than the number of input bars

IndicatorSpeedRangeBest Use
STCFastest0-100Early trend detection
MACDModerateUnboundedTrend strength/divergences
StochasticFast0-100Overbought/oversold reversals
RSIModerate0-100Momentum, divergences

Summary

AspectDetail
Full NameSchaff Trend Cycle
CreatorDoug Schaff (1990s)
Core IdeaDouble stochastic of MACD for speed
Range0-100
Buy SignalCrosses above 25
Sell SignalCrosses below 75
StrengthFaster than MACD, bounded output
WeaknessComplex, whipsaws in ranges

Indicator Assessment

%%{init: {'theme': 'base', 'themeVariables': {'quadrant1Fill': '#e8f5e9', 'quadrant2Fill': '#e3f2fd', 'quadrant3Fill': '#fff3e0', 'quadrant4Fill': '#fce4ec', 'quadrantTitleFill': '#f5f5f5'}}}%%
quadrantChart
    title STC - Complexity vs. Reliability
    x-axis Low Complexity --> High Complexity
    y-axis Low Reliability --> High Reliability
    quadrant-1 Efficient Power
    quadrant-2 Complex Value
    quadrant-3 Limited Use
    quadrant-4 Simple Trade-off
    STC-Stocks: [0.60, 0.60]
    STC-Crypto: [0.60, 0.55]

Five-Dimension Rating

DimensionStocksCryptoRationale
Popularity6/107/10Niche indicator; known among forex traders but less common than MACD or RSI. Growing use in crypto.
Reliability6/105.5/10Works well in trending markets but struggles in ranges. Higher volatility in crypto increases false signals.
Complexity6/106/10A double stochastic of MACD takes some study. The concept is not easy for beginners.
Versatility6/106.5/10Best for trending markets and swing trading. Limited use for mean reversion or ranging markets.
Recent Interest5/106/10Steady but specialized interest. Crypto traders value its speed advantage over MACD.

Further Reading

Rendering diagrams...
© 2026 WanoLabs. All rights reservedBeta v0.1.5