Concept
The stochastic oscillator, popularized by George Lane, asks: “Within the range of the last 14 days, is today’s close near the top or near the bottom?” Near 100 means the close was near the top of the range; near 0 means near the bottom.
- %K (blue): the close’s position within the range. This site uses the “slow %K”, smoothed once with a 3-day average.
- %D (orange): a 3-day average of %K. It moves more slowly than %K.
- Above 80 is often called overbought and below 20 oversold.
It looks like RSI, but RSI compares gains with losses while the stochastic looks at position within the recent price range. Compare the same examples on the RSI page.
How it is calculated
Raw %K = (today’s close − 14-day low) ÷ (14-day high − 14-day low) × 100
Slow %K = 3-day average of raw %K
%D = 3-day average of slow %K
- If the 14-day high and low are equal (no price change), it cannot be calculated and is set to 50.
- Shorter settings such as 5·3·3 instead of the default 14·3·3 are more sensitive. Change the periods with the settings button next to Stochastic, or use Add stochastic to show 5·3·3 (short), 10·6·6 (medium) and 20·12·12 (long) together — overlapping on one pane or in separate panes.
- The results were tested against a small hand-calculated example.
Cautions when reading it
- Stuck in strong trends: as in the second example, %K can stay below 20 for a long time while the price keeps falling. Oversold does not mean it will soon rise.
- Frequent signals: %K and %D cross often, so each cross means little.
- Range-based: it only looks at the last 14 days’ range, so it does not reflect longer trends.
Chart shapes and indicators summarize past prices. The same shape is sometimes right and sometimes wrong depending on the market, and this page does not tell you when to buy or sell any stock. To practice yourself, try the chart lab or mock trading.