Stochastic Oscillator
Reversal entries when %K crosses %D in overbought or oversold zones.
What it is
The Stochastic Oscillator strategy uses the %K / %D crossover to time mean-reversion entries, but only inside extreme zones (overbought above 80, oversold below 20).
Compared to a raw stochastic crossover (which fires constantly in choppy markets), the zone-gated version is far more selective: it only triggers when momentum has reached a statistical extreme and is starting to roll back.
How signals fire
Long entry triggers when %K crosses above %D *while %D is still below 20* (oversold zone). The crossover signals momentum has bottomed; the OS zone confirms the bounce is from a meaningful extreme.
Short entry is symmetric: %K crosses below %D while %D is still above 80 (overbought zone).
Exit is held for a fixed number of bars (default 5).
Defaults: %K period 14, %K smoothing 3, %D period 3, OB 80, OS 20, hold 5 bars.
When it works
Range-bound or oscillating markets where momentum reaches genuine extremes and reverses. Crypto consolidation phases and FX during quiet sessions tend to produce clean stochastic mean-reversions.
Markets with clear OB/OS structure — those that respect 80/20 thresholds rather than persistently riding above 80 or below 20.
When it fails
Strong trending markets where %K rides above 80 (or below 20) for extended runs. Each crossover-in-zone produces a losing trade as the trend continues.
Very volatile markets where %K/%D crosses many times within zones — the signal becomes noise.
Pre-news or low-liquidity periods where %K can spike to extremes without meaningful price movement.
Built-in presets
- Baseline
Standard 14-3-3 stochastic, OB 80 / OS 20, 5-bar hold.
- Faster
9-3-3 stochastic — more reactive to recent price.
- Stricter zones
Tighten OB/OS to 85/15 — fewer signals, but only at deeper extremes.
Recommended indicator filters
- RSI 70/30 — confirm extremes from two oscillators, reduce single-indicator false signals.
- ADX ≤ 20 — favour low-trend regimes where mean-reversion is more likely.
- Volume × 1.0 SMA — require above-average volume on the crossover.
Common pitfalls
- Trading every %K/%D cross — the zone gate (OB/OS) is essential to avoid noise.
- Using stochastic in strong trends — it stays pinned at extremes for many bars.
- Setting %K period too low (< 9) — output becomes too noisy to define reversals.
- Treating 80/20 as fixed levels — different assets and timeframes need calibration.
Related indicators
Stochastic Oscillator
StochCore indicator. Understanding %K/%D smoothing is essential to interpreting signal quality.
Relative Strength Index
RSIEffective second-confirmation oscillator — overlaps with Stochastic but uses a different formula.
Average Directional Index
ADXCritical filter — Stochastic mean-reversion fails badly in trends, ADX ≤ 20 gates that out.
Related strategies
Related reading
How to read an equity curve without fooling yourself
Read →Stochastic mean-reversion produces visually distinct curves — flat sawtooth in ranges, sharp drawdowns in trends.
Five backtest mistakes that wipe out real money
Read →Calibrating OB/OS thresholds is one of the most common overfitting traps — read mistake #4 before tuning.
Try Stochastic Oscillator in the backtester
Open the engine, pick Stochastic Oscillator, choose a preset, and run it against synthetic or your own historical data. Tune parameters, add filters, and see how it behaves out-of-sample with walk-forward and Monte Carlo analysis.
Open the backtester →Educational note: This page explains how Stochastic Oscillator fires and the market conditions it suits. It does not constitute investment advice. Backtested results are hypothetical simulations on past data; they cannot guarantee future outcomes. See the full disclaimer.
Last updated: 2026-05-08