# Schaff Trend Cycle

Schaff Trend Cycle is an indicator on [Vela](https://vela.luxalgo.com/chart), our next-generation charting platform, written in Pine Script®.

A clean 0-100 Schaff Trend Cycle: a MACD from 23- and 50-period EMAs is passed twice through a 10-bar stochastic with 0.5 recursive smoothing, colored by its side of the 50 midline. Dashed triggers at 75 and 25 frame the reads (a cross up through the lower trigger flags an emerging uptrend), and four alerts cover trigger crosses and extreme entries.

- Indicator in the LuxAlgo Library, by LuxAlgo, published May 6, 2026.
- Access: free.
- Concepts: [Schaff Trend Cycle](https://www.luxalgo.com/library/concept/schaff-trend-cycle/) (primary)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=on631gwwrhf5ymiunjm26tla
- Page: https://www.luxalgo.com/library/indicator/schaff-trend-cycle/

**Schaff Trend Cycle** is the definitive clean build of the [Schaff Trend Cycle](https://www.luxalgo.com/library/concept/schaff-trend-cycle/): a MACD computed from 23- and 50-period EMAs, passed twice through a 10-bar stochastic normalization with recursive smoothing after each pass. The result is a fast 0-100 line, colored by its side of the 50 midline with a gradient fill, framed by dashed trigger lines at 75 and 25 and a dotted midline.

## How to Trade the Schaff Trend Cycle?

- **Cross up through the Lower Trigger**: the classic emerging-uptrend signal, taken as the cycle lifts off its floor.
- **Cross down through the Upper Trigger**: the mirrored emerging-downtrend signal.
- **Pinned readings**: a line parked against 0 or 100 usually means the trend is still delivering: the cycle saturates at its bounds by design rather than signaling exhaustion.

Four alerts cover both trigger crosses and both entries into the extreme zones; the pane markers for trigger crossings stay off by default so the alerts can do the work.

## Schaff Trend Cycle Settings

- **Source** (default close): price series behind the underlying MACD.
- **Fast Length** (default 23) and **Slow Length** (default 50): the MACD's EMAs, deliberately slower than the classic 12/26. The stochastic passes provide the reaction speed, so the trend leg can stay steady.
- **Cycle Length** (default 10): window of both stochastic passes.
- **Smoothing Factor** (default 0.5): recursive smoothing applied after each pass; higher values react faster.
- **Upper Trigger** (default 75) / **Lower Trigger** (default 25): the crossing levels.
- **Gradient Fill** is on and **Trigger Crossing Markers** off by default.

## Frequently Asked Questions

### How does STC differ from Stochastic RSI?

Same architecture, different engine. [Stochastic RSI](https://www.luxalgo.com/library/indicator/stochastic-rsi/) rescales an RSI inside its own recent range; STC rescales a MACD, and does it twice. The doubled pass on a slower base turns STC into a trend-cycle gauge, where StochRSI remains a momentum-extreme finder.

### Why 23 and 50 instead of the usual MACD lengths?

Because the normalization supplies the speed, the MACD underneath can afford to be slow. The defaults keep the trend measurement steady and let the stochastic passes do the reacting; shortening them makes an already quick line jumpy.

### Can I fade overbought and oversold readings on it?

Mostly no. The double normalization pins the cycle against its bounds while a trend runs, so an extreme reading is trend information rather than an invitation to fade. The trigger-line crosses are the pattern's actionable events.

## Related indicators

- [Adaptive MACD](https://www.luxalgo.com/library/indicator/adaptive-macd/) (MACD): markdown at https://www.luxalgo.com/library/indicator/adaptive-macd.md
- [MACD Based Price Forecasting](https://www.luxalgo.com/library/indicator/macd-based-price-forecasting/) (MACD): markdown at https://www.luxalgo.com/library/indicator/macd-based-price-forecasting.md
- [Volume-weighted MACD](https://www.luxalgo.com/library/indicator/volume-weighted-macd/) (Momentum & Oscillators): markdown at https://www.luxalgo.com/library/indicator/volume-weighted-macd.md
- [Impulse MACD](https://www.luxalgo.com/library/indicator/impulse-macd/) (Momentum & Oscillators): markdown at https://www.luxalgo.com/library/indicator/impulse-macd.md
- [MACD-V](https://www.luxalgo.com/library/indicator/macd-v/) (Momentum & Oscillators): markdown at https://www.luxalgo.com/library/indicator/macd-v.md
- [Zero-lag MACD](https://www.luxalgo.com/library/indicator/zero-lag-macd/) (Momentum & Oscillators): markdown at https://www.luxalgo.com/library/indicator/zero-lag-macd.md
- [MACD](https://www.luxalgo.com/library/indicator/macd/) (Momentum & Oscillators): markdown at https://www.luxalgo.com/library/indicator/macd.md
- [OsMA](https://www.luxalgo.com/library/indicator/osma/) (Momentum & Oscillators): markdown at https://www.luxalgo.com/library/indicator/osma.md

---

Source: https://www.luxalgo.com/library/indicator/schaff-trend-cycle/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
