
The Stochastic Oscillator: Spotting Pullbacks in an Uptrend
Picture a stock that has climbed for months, then slips for a few days. Is the climb over, or is this a short dip inside a longer rise? The Stochastic Oscillator is one way to put a number on that dip.
It answers a narrow question: where did the latest close land inside the recent high-to-low range? The answer is a score from 0 to 100. Close to 0 means the stock finished near the bottom of its recent range, and close to 100 means it finished near the top.
This post explains the two lines on a Stochastic chart, how they differ from RSI, the trap that catches new chart readers, and how to look for pullbacks in Rapunzl's Stock Scanner. It ends with a 15-minute classroom activity.
What does the Stochastic Oscillator show?
The Stochastic Oscillator shows where a stock's close sits between its highest high and its lowest low over a set number of sessions. Closing near the top of the range reads strong. Closing near the bottom reads weak.
The math is a ratio. Take the highest high and the lowest low over the last N sessions. Then ask how far up that span the latest close sits. A close at the low scores 0, and a close at the high scores 100.
A worked example follows. Every figure is an illustration, not real data. Say a stock's 14-session low is $48 and its high is $60, a span of $12. If it closes at $50, it sits $2 above the low, and $2 divided by $12 is about 17. If it closes at $58, it sits $10 above the low, and $10 divided by $12 is about 83.
Notice what the score ignores. It does not care whether $50 is a "cheap" price. It only compares the close with that stock's own recent range, which is why a $20 stock and a $500 stock can be compared on the same 0 to 100 scale.
How do you read %K and %D?
There are two lines. %K is the score described above. %D is a short moving average of %K, so it follows %K a step behind and moves more smoothly.
Rapunzl's chart defaults are a 14-session %K period, 3 sessions of extra smoothing on %K, and a 3-session %D period. In Rapunzl's Stock Scanner the same measure is described as where the close sits in the last 14 sessions' range, written as (14, 3, 3).
Two reference lines sit on the panel at 20 and 80. A reading over 80 is called overbought, and a reading under 20 is called oversold. Those words describe where the close sits in its range. They do not predict what happens next.
Chart readers also watch the lines cross. When %K moves up through %D inside the low zone, the move is read as a possible turn upward. When %K moves down through %D inside the high zone, it is read as a possible turn downward. Treat a crossing as a prompt to look closer, not as an answer.
To tell them apart, %K is the fast line that reacts to every session, and %D is the slow line that filters out some of the noise.
How is it different from RSI?
RSI and the Stochastic Oscillator both live on a 0 to 100 panel and both use overbought and oversold zones, but they measure different things. RSI compares the size of recent up-day gains with down-day losses. The Stochastic Oscillator compares the close with the recent high-low range.
That difference matters in practice. The classic RSI zones are 30 and 70, while the Stochastic zones are 20 and 80. Our RSI explainer covers how RSI is built and why it can stay above 70 for weeks in a strong uptrend.
| Feature | RSI | Stochastic Oscillator |
|---|---|---|
| What it compares | Size of recent up-day gains with down-day losses | The latest close with the recent high-to-low range |
| Scale | 0 to 100 | 0 to 100 |
| Classic zones | 30 and 70 | 20 and 80 |
| Lines | One | Two: %K and %D |
| On Rapunzl charts | One of the basic studies | Part of Rapunzl Premium |
One habit helps here. Pick one of the two as your main momentum read, and use the other only when you want a second opinion. Stacking five similar oscillators on one chart mostly shows the same thing five times.
The trap: low does not mean about to bounce
The biggest mistake with the Stochastic Oscillator is treating a reading under 20 as a reason a stock must rise. It is a description of where the close sits, nothing more.
In a strong downtrend, %K can sit under 20 for a long time because the stock keeps closing near the bottom of its range. The same thing happens at the top in a strong uptrend, where %K can stay pinned above 80 while the stock keeps climbing. Rapunzl's library calls the indicator very sensitive, so it throws frequent signals and the smoothing settings matter a lot.
That is why chart readers pair it with a trend filter. A low Stochastic reading means something different in a stock that has been rising for a year than in a stock that has been falling for a year. Asking "which way is the bigger trend?" first is how a dip gets separated from a decline.
Even then, a pullback can turn into a full reversal. The long-term trend only counts while it holds.
A Stock Scanner setup to try: pullback in an uptrend
Rapunzl's Stock Scanner has a ready-made idea for exactly this question. It is called Pullback in an uptrend, and it lists companies worth $2 billion or more that trade above their 200-day average and have a Stochastic %K under 20. It sorts the lowest %K first.
Each part of that screen does a job. The size filter keeps the list to larger companies. The 200-day average filter keeps only stocks whose price is above their long-term trend line, a line our guide to golden and death crosses explains alongside the 50-day average. The %K filter finds the ones that closed near the bottom of their recent range.
Try it, then open three or four names from the list and read their charts. Ask the same two questions about each: how far has the price slipped, and has the 200-day line itself been rising or flat?
If you want to build your own version, the scanner's Stochastic filter lets you pick %K, the fast line, or %D, the slow line. Try the same screen with each. Because %D is a 3-day average, it reacts more slowly than %K, so the two lists can differ. Comparing them is a good way to see what smoothing does.
The scanner's filter editor also draws a practice chart for the Stochastic fields. That chart uses a made-up, seeded price history, so use it as a drill and never as real data. The Stock Scanner page shows what else is available.
Screens like this produce research starting points. They do not tell anyone what to do with a stock, and nothing in them is a recommendation.
The same stock on a customized chart
Once a name catches your eye, put it on a chart and look at the same measure visually. Stochastic is part of Rapunzl Premium, so what follows applies to accounts that include it.
Set the chart type to Candlestick or OHLC. The study uses each day's high, low and close, and a Line chart carries closing prices only, so the study does not run on a Line chart. Open the chart customization menu, find Stochastic Oscillator in the Advanced list, and add it. The defaults are %K period 14, smooth %K 3 and %D period 3, which match the scanner.
The panel draws %K as a solid line and %D as a dashed line, with guide lines at 20 and 80. Then add a simple moving average with a period of 200 on the price chart, so the long-term trend and the dip sit on one screen.
Now look for the pattern the scanner describes: price above the 200-day line, %K down in the low zone. Then change one setting, such as the %K period from 14 to 5, and watch how much busier the lines get. A shorter window reacts faster and produces more crossings. If you want help interpreting what you see, you can ask the AI Tutor about the study from the chart.
For a second view of price movement against a range, our Bollinger Bands guide shows a different way to describe a stretched price.
A 15-minute classroom activity
This activity needs a printed price table or a projected chart, a pencil, and a calculator. It works as a warm-up for a technical analysis unit. No finance background is needed, and the numbers are made up.
Minutes 0 to 3. Give each pair a table of 14 days of made-up high, low and close prices. Ask them to find the highest high and the lowest low.
Minutes 3 to 8. Each pair computes %K for the last close: subtract the lowest low from the close, divide by the span between the highest high and the lowest low, and multiply by 100. Then they compute %K for two earlier days and average the three values to get a rough %D.
Minutes 8 to 12. Open the Pullback in an uptrend idea in Rapunzl's Stock Scanner on the board and pick two names. Students check whether each sits above its 200-day average and whether %K is under 20, then write one sentence about what else they would want to see before drawing any conclusion.
Minutes 12 to 15. Hold a quick debrief with this prompt: "A stock closes at the bottom of its range for five days in a row. Name two different stories that could explain it." Collect answers on the board. The goal is to see that one number fits several stories.
Students can then try the same exercise on a stock in the simulator, where practice trades use simulated money.
Frequently Asked
Questions
It measures where the latest close sits inside the recent high-to-low range, on a 0 to 100 scale. A close near the top of the range reads strong, and a close near the bottom reads weak.
%K is the position of the close inside the range. %D is a short moving average of %K, used as a signal line, so it follows %K a step behind and moves more smoothly.
Over 80 is called overbought and under 20 is called oversold. Those labels describe where the close sits in its range. They are not predictions of what the stock does next.
No. In a strong trend the oscillator can stay pinned at an extreme for a long time. Rapunzl's library calls it very sensitive, so it throws frequent signals, and a pullback can still turn into a full reversal.
A %K period of 14, a %K smoothing of 3 and a %D period of 3, written as (14, 3, 3). Rapunzl's Stock Scanner uses the same 14, 3, 3 setup for its Stochastic fields.
No. RSI compares the size of recent up-day gains with down-day losses, while the Stochastic Oscillator compares the close with the recent high-low range. Both sit on a 0 to 100 panel, but RSI uses 30 and 70 as its classic zones and the Stochastic Oscillator uses 20 and 80.
Bring the Stock Scanner to your classroom
Request a demo to see how Rapunzl's Stock Scanner and the rest of the platform fit your course. If you are a parent who wants your child to explore this at home, the details are on our parents page.
By Nate Thomas, School Partnerships Lead at Rapunzl.
Get the free Stock Market teaching pack
Slide deck + 2 ready-to-teach worksheets — Stocks in Everyday Life and Choose a Stock — plus both answer keys. Free.











