Schaff Trend Cycle
systemic:core-stcIndicatorsInputs
| Name | Type | Description |
|---|---|---|
| Slow Window | Whole number | The window, in bars, of the long (slow) EMA in the MACD calculation. |
| Fast Window | Whole number | The window, in bars, of the short (fast) EMA in the MACD calculation. |
| Cycle | Whole number | The look-back window, in bars, of the two stochastic calculations applied to the MACD. |
| First Smooth Factor | Number | The window, in bars, of the EMA that smooths the first stochastic calculation. |
| Second Smooth Factor | Number | The window, in bars, of the EMA that smooths the second stochastic calculation (the final output). |
| Price Data | Number series | The price series used to calculate the MACD inside the STC. |
Outputs
| Name | Type | Description |
|---|---|---|
| STC | Number series | The Schaff Trend Cycle oscillator value, from 0 to 100. |
Cost
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?
- MACD captures trend momentum (but it is unbounded and slow)
- First stochastic scales MACD to 0-100 and makes its turns faster
- 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 Zone | Reading | Market Implication |
|---|---|---|
| Bullish | 75-100 | Strong uptrend; potential overbought |
| Neutral | 25-75 | Transition; trend developing or fading |
| Bearish | 0-25 | Strong 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
| Signal | Condition | Interpretation |
|---|---|---|
| Buy | STC crosses above 25 | Leaving oversold; uptrend starting |
| Sell | STC crosses below 75 | Leaving overbought; downtrend starting |
Trend Confirmation
| STC Behavior | What It Means |
|---|---|
| Holding > 75 | Strong uptrend in progress |
| Holding < 25 | Strong downtrend in progress |
| Oscillating 25-75 | Ranging 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
| Input | Typical value | Purpose |
|---|---|---|
| Slow Window | 50 | Window of the long EMA in the MACD |
| Fast Window | 23 | Window of the short EMA in the MACD |
| Cycle | 10 | Look-back window of both stochastics |
| First Smooth Factor | 3 | EMA window that smooths the first stochastic |
| Second Smooth Factor | 3 | EMA 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:
| Scenario | Output |
|---|---|
| Closed-market gap | Empty 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 missing | Every bar is empty |
| Too few bars | The run fails if Slow Window, Fast Window or Cycle is larger than the number of input bars |
STC vs. Related Indicators
| Indicator | Speed | Range | Best Use |
|---|---|---|---|
| STC | Fastest | 0-100 | Early trend detection |
| MACD | Moderate | Unbounded | Trend strength/divergences |
| Stochastic | Fast | 0-100 | Overbought/oversold reversals |
| RSI | Moderate | 0-100 | Momentum, divergences |
Summary
| Aspect | Detail |
|---|---|
| Full Name | Schaff Trend Cycle |
| Creator | Doug Schaff (1990s) |
| Core Idea | Double stochastic of MACD for speed |
| Range | 0-100 |
| Buy Signal | Crosses above 25 |
| Sell Signal | Crosses below 75 |
| Strength | Faster than MACD, bounded output |
| Weakness | Complex, 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
| Dimension | Stocks | Crypto | Rationale |
|---|---|---|---|
| Popularity | 6/10 | 7/10 | Niche indicator; known among forex traders but less common than MACD or RSI. Growing use in crypto. |
| Reliability | 6/10 | 5.5/10 | Works well in trending markets but struggles in ranges. Higher volatility in crypto increases false signals. |
| Complexity | 6/10 | 6/10 | A double stochastic of MACD takes some study. The concept is not easy for beginners. |
| Versatility | 6/10 | 6.5/10 | Best for trending markets and swing trading. Limited use for mean reversion or ranging markets. |
| Recent Interest | 5/10 | 6/10 | Steady but specialized interest. Crypto traders value its speed advantage over MACD. |