TL;DR. The MACD line, rescaled to 0 to 100 by a stochastic, smoothed, then put through a second stochastic and smoothed again. It sits pinned near 0 or 100 for long stretches and moves between them quickly: rising out of 25 is the classic buy reading, falling out of 75 the sell.
What it measures
- Where the MACD sits in its recent range. The first stochastic asks how high the MACD is within its last
cyclebars, as a percent. - The cycle of that reading. The second stochastic does the same to the first, which sharpens the turns.
- Speed. Built on MACD, it turns earlier than MACD's own signal cross, at the cost of more flat-lined stretches and some false turns.
Formula
Inputs in AlgoLift
| Setting | Default | Range | Notes |
|---|---|---|---|
| Cycle | 10 | 1 to 500 | Bars in each stochastic window. |
| Fast period | 12 | 1 to 500 | Bars in the MACD's fast EMA. |
| Slow period | 26 | 1 to 500 | Bars in the MACD's slow EMA. The two swap if slow is the shorter. |
| Smoothing factor | 0.5 | 0.05 to 1 | How much of each new stochastic reading each pass takes in. 1 is no smoothing. |
| Source | Close | Close, Open, High, Low, HL2, HLC3, OHLC4 | Which value of each bar the MACD reads. |
Outputs in AlgoLift
| Handle | Type | Plotted | Notes |
|---|---|---|---|
| STC | Numeric | Always | The second smoothed stochastic, 0 to 100. Dashed guides at 25 and 75. |
| MACD | Numeric | On select | The fast EMA minus the slow EMA, in price units. |
| Stochastic | Numeric | On select | The first smoothed stochastic, 0 to 100. |
How to read it
- Rising through 25: the MACD is climbing out of the bottom of its range. The buy reading.
- Falling through 75: the mirror, the sell reading.
- Pinned at 100 or 0: the trend is steady. The line carries little new information until it leaves.
- A turn that stalls mid-range: a failed cycle. These are the false turns the speed costs.
Best in, worst in
Best in markets with regular swings, where its quick turns catch each leg early.
Worst in choppy, directionless sessions, where the MACD's range is tiny and the line whipsaws between 0 and 100.
Three setups
1. Leave the bottom
Enter long when a Crossover of STC above 25 fires; enter short when STC crosses below 75. Exit on the opposite cross.
2. Trend-side cycles
Take only the 25 crosses while price is above an EMA of 100 bars and only the 75 crosses below it.
3. Confirm with the MACD
AND the 25 cross with a Comparison that the MACD output is above its value 3 bars ago, so the stochastic's turn is backed by a rising MACD.
Common mistakes
- Smoothing factor at 1. Without smoothing the line jumps between extremes bar to bar. Start at the default 0.5.
- Trading the extremes. Reaching 0 or 100 is not a signal; leaving it is.
- Short cycles on fast bars. A cycle of 3 on 1-minute bars is mostly noise. Keep the cycle long enough that its range means something (overfitting in trading).
STC is a doubly-stochastic, smoothed MACD on 0 to 100: it turns early and pins at the extremes, so trade it as it leaves 25 or 75.