Stochastic Oscillator¶
In the previous chapter you learnt that RSI compares recent gains with recent losses. The Stochastic Oscillator asks a different question: where did today's close finish inside the recent high-low range? It is fast and gives clear crossover signals, which makes it popular with intraday traders. It also gives many false signals in trends. In this chapter you will learn to read %K and %D, choose between the fast and slow versions, and use the Stochastic only where it works: in ranges.
What you will learn
- What the Stochastic Oscillator measures, and how to calculate %K and %D
- The difference between the fast and the slow stochastic
- Crossover signals in the 80 and 20 zones
- Why the Stochastic fails in trends, and how to check for a range first
- Settings for Nifty, Bank Nifty and stocks
- Three complete option trades, including one where the range breaks
What is the Stochastic Oscillator?¶
The Stochastic Oscillator shows where the latest close sits between the highest high and the lowest low of the last N bars. It was made popular by George Lane in the 1950s. The idea is simple. In a rising market, prices tend to close near the top of their recent range. In a falling market, they tend to close near the bottom. When closes stop reaching the top of the range, upward momentum is fading.
The result is a number from 0 to 100.
- 100 means the close is at the highest high of the period.
- 0 means the close is at the lowest low of the period.
- 50 means the close is exactly in the middle.
The formula in plain words¶
The standard setting is 14 bars.
%K (raw) = (Close - Lowest low of 14 bars) ÷ (Highest high of 14 bars - Lowest low of 14 bars) × 100
%D = 3-bar average of %K
%K is the main line (shown in blue on most platforms). %D is a slower signal line (shown in orange). Crossovers of %K and %D are the main signals.
A small worked calculation¶
Over the last 14 days, the highest high of Nifty was 23,300 and the lowest low was 22,800. The range is 23,300 - 22,800 = 500 points.
| Today's close | Calculation | %K |
|---|---|---|
| 23,200 | (23,200 - 22,800) ÷ 500 × 100 = 400 ÷ 500 × 100 | 80 |
| 23,050 | (23,050 - 22,800) ÷ 500 × 100 = 250 ÷ 500 × 100 | 50 |
| 22,900 | (22,900 - 22,800) ÷ 500 × 100 = 100 ÷ 500 × 100 | 20 |
If the last three values of %K were 80, 70 and 60, then %D = (80 + 70 + 60) ÷ 3 = 70. %K at 60 is below %D at 70: a bearish crossover has happened.
Fast and slow stochastic¶
The raw %K above jumps around a lot. That version is called the fast stochastic. Most traders use the slow stochastic, which smooths %K once more:
- Slow %K = 3-bar average of the raw %K.
- Slow %D = 3-bar average of the slow %K.
This is the setting written as 14, 3, 3: 14 bars for the range, 3 bars of smoothing for %K, and 3 bars for %D. It is the default on most Indian broker charts.

In this example, the fast %K crossed its %D 23 times in about four months. The slow %K crossed its %D only 7 times over the same period. Most of the extra fast crosses were noise. In this chapter, "Stochastic" means the slow stochastic (14, 3, 3) unless we say otherwise.
How to read the Stochastic on a chart¶
The chart below shows Nifty (example) moving in a range, with the slow stochastic in the lower panel.

Read it in three steps.
- The zones. Above 80 is the overbought zone; below 20 is the oversold zone. As with RSI, these words only describe where the close sits in the recent range.
- The crossover. %K crossing below %D in the overbought zone is a sell signal. %K crossing above %D in the oversold zone is a buy signal. The red and green arrows on the chart mark these crossovers.
- The price. A crossover counts only when the price is at a sensible place, such as the top or bottom of the range.
In this range, the sell crossovers came on 10 July, 20 August, 27 August and 19 October, all near the top of the range. The buy crossovers came on 18 June, 24 June, 30 July, 16 September and 22 September, all near the bottom. Notice that some signals came in pairs: the first one was a little early, and the price made one more push before turning. That is normal, and it is why you always need a stop beyond the range edge.
Settings¶
| Style | Chart | Setting | Notes |
|---|---|---|---|
| Nifty intraday | 5 minute | 14, 3, 3 or 5, 3, 3 | 5, 3, 3 is very fast and noisy; use it only in clear ranges |
| Nifty and Bank Nifty intraday | 15 minute | 14, 3, 3 | Good balance for range days |
| Swing (Nifty, Bank Nifty) | Daily | 14, 3, 3 | The standard setting |
| Slower swing | Daily | 21, 5, 5 | Fewer signals, fits monthly options |
| Stocks | Daily | 14, 3, 3 | Use liquid F&O stocks; check the bid-ask spread of the options |
The overbought and oversold levels are usually 80 and 20. Some traders use 85 and 15 to get fewer but more extreme signals.
Signals¶
1. Crossovers in the zones¶
- Buy signal: %K crosses above %D while both are below 20 (or just leaving the zone).
- Sell signal: %K crosses below %D while both are above 80.
Crossovers in the middle of the scale (between 20 and 80) are weak and best ignored.
2. Leaving the zone¶
A stricter version waits for %K to leave the zone: for a buy, %K crosses back above 20; for a sell, %K crosses back below 80. This gives fewer false signals, at the cost of a later entry.
3. Divergence¶
Like RSI, the Stochastic can show a divergence. It can be a higher high in price with a lower high in %K, or a lower low in price with a higher low in %K. Because the Stochastic is faster than RSI, its divergences are more frequent and less reliable. Treat them only as warnings.
What the Stochastic is not good at: trends¶
This is the most important point of the chapter. The Stochastic works only in ranges. In a trend, the close keeps finishing near the top (or bottom) of the recent range, so the Stochastic stays in the zone for weeks.

In this example, the Stochastic first went "overbought" on 19 August with Nifty at about 22,556. Over the last 50 trading days, %K was above 80 on 34 days. Nifty rose another 1,144 points to 23,700. A trader who sold calls on every bearish crossover above 80 would have lost again and again.
Check for a range before you use the Stochastic
Use the Stochastic only when the market is moving sideways between clear support and resistance. Simple checks: a flat 50 SMA, at least two touches of the range top and bottom, or ADX below about 20. If the market is trending, switch off the Stochastic or read it only in the direction of the trend.
| The Stochastic is good at | The Stochastic is bad at |
|---|---|
| Timing entries near the edges of a range | Trends: it stays overbought or oversold for weeks |
| Clear, rule-based crossover signals | Breakouts: it gives a "reversal" signal just before the range breaks |
| Intraday range days on the 15-minute chart | Telling you the size of the move |
| Choosing the moment to sell premium at a range edge | Being used as a second opinion for RSI (they measure almost the same thing) |
Trade examples¶
The charts are illustrations with synthetic prices. Premiums come from the Black-Scholes model in our course toolkit. Results are for one lot, before brokerage and taxes.
Example 1: Swing trade, bearish crossover at the top of a Bank Nifty range (bear call spread)¶
The setup. Look at this Bank Nifty daily chart (example).

- Since June, Bank Nifty has moved between about 53,300 and 55,400, touching both edges several times.
- The Stochastic has swung cleanly between the two zones, which confirms the range.
- On 3 November, Bank Nifty closed at 54,800, near the top of the range.
- %K (82.8) crossed below %D (88.2); the day before, both were at 90.9.
The market view. Bank Nifty will turn down from the top of the range, or at least not break above it, over the next two to three weeks.
Why this option trade. In a range, the most reliable part of the view is "the price will not go above the range top". A bear call spread earns money if Bank Nifty simply stays below the sold strike, even without a fall. The sold 55200 CE sits just above most of the range highs, and the bought 55700 CE caps the loss. Bank Nifty has only monthly options, so we use the 23 November expiry (20 days away).
The trade (3 November 2026, Bank Nifty 54,800, 20 days to expiry, IV 15%, lot 30).
| Leg | Action | Contract | Premium | Quantity |
|---|---|---|---|---|
| 1 | Sell | BANKNIFTY 23 NOV 55200 CE | ₹654.20 | 30 |
| 2 | Buy | BANKNIFTY 23 NOV 55700 CE | ₹446.85 | 30 |
| Net credit | ₹207.35 | ₹6,220.50 per lot |
- Maximum profit = 207.35 × 30 = ₹6,220.50, if Bank Nifty is below 55,200 at expiry.
- Maximum loss = (500 - 207.35) × 30 = 292.65 × 30 = ₹8,779.50.
- Breakeven at expiry = 55,200 + 207.35 = 55,407.35.

The plan.
- Entry: at the close of 3 November.
- Stop loss: a daily close above 55,250. That would mean the range is breaking upwards, and the Stochastic signal has failed. In the first few days the spread would then cost about ₹254 to ₹256 to buy back, a loss of about ₹1,400 to ₹1,460 per lot.
- Target: exit when %K falls below 20, which means the swing from the top to the bottom of the range is complete.
- Time exit: 18 November, to avoid the last days before expiry.
What happened. Bank Nifty never closed above 54,711.21 after the entry. It fell steadily, and on 11 November %K dropped to 15.7 with Bank Nifty at 54,267.51. With 12 days left and IV at 14.5%, the 55200 CE was ₹236.70 and the 55700 CE was ₹125.20. The trader bought back the spread for ₹111.50.
Result: (207.35 - 111.50) × 30 = 95.85 × 30 = +₹2,875.50 for one lot.
Example 2: Intraday, bullish crossover at range support (buy a call)¶
The setup. Look at this Nifty 15-minute chart (example) for 3 to 5 November 2026.

- For two days, Nifty moved between about 22,956 and 23,104 on the 15-minute chart.
- On 5 November it fell back to the bottom of the range, with a low of 22,955.14.
- The 11:15 candle closed at 22,985 (11:30 am), and %K (13.4) crossed above %D (11.0) in the oversold zone.
The market view. Nifty will bounce from range support back towards the range top, about 23,080, today.
Why this option trade. The expected move is about 95 points within a few hours. Buying an at-the-money call gives a delta of about 0.50 and a small, defined risk. The nearest weekly expiry is 9 November, 4 days away, so a few hours of time decay cost little.
The trade (5 November 2026, 11:30 am, Nifty 22,985, IV 12.5%).
| Item | Value |
|---|---|
| Contract | NIFTY 09 NOV 23000 CE |
| Premium | ₹122.40 |
| Cost for one lot | 122.40 × 65 = ₹7,956 |
| Delta | 0.50 |
The plan.
- Entry: 11:30 am, on the close of the crossover candle.
- Stop loss: a 15-minute close below 22,940, below the range bottom. At that level the call would be worth about ₹99.75, a loss of (122.40 - 99.75) × 65 = 22.65 × 65 = ₹1,472.25.
- Target: Nifty at 23,080, just below the range top.
- Time exit: 3:00 pm.
What happened. After the entry, the lowest close was 22,994.89. Nifty rose steadily and reached 23,080 in the 1:00 pm candle, while %K climbed to 94.2. The trader sold the call at ₹177.70.
Result: (177.70 - 122.40) × 65 = 55.30 × 65 = +₹3,594.50 for one lot, against a planned risk of ₹1,472.25.
Example 3: Swing trade, the range breaks down (bull put spread, stopped out)¶
This example shows what happens when a range ends.
The setup. Look at this Nifty daily chart (example).

- Since June, Nifty had moved between about 22,650 and 23,350.
- In late October it slid back to the bottom of the range.
- On 2 November, %K (17.0) crossed above %D (13.8) in the oversold zone.
- On 3 November, Nifty closed at 22,770, and %K rose to 22.1, just leaving the zone.
There was one warning sign: the last rally from the range bottom (in October) was weak and did not reach the range top.
The market view. Nifty will hold the range bottom and stay above 22,600 for the next two weeks.
Why this option trade. A bull put spread earns money if Nifty simply holds above the sold strike. The sold 22600 PE sits below the range low of about 22,614, and the bought 22400 PE caps the loss. We use the 17 November weekly expiry (14 days away).
The trade (3 November 2026, Nifty 22,770, 14 days to expiry, IV 13%).
| Leg | Action | Contract | Premium | Quantity |
|---|---|---|---|---|
| 1 | Sell | NIFTY 17 NOV 22600 PE | ₹141.05 | 65 |
| 2 | Buy | NIFTY 17 NOV 22400 PE | ₹87.80 | 65 |
| Net credit | ₹53.25 | ₹3,461.25 per lot |
- Maximum profit = ₹3,461.25.
- Maximum loss = (200 - 53.25) × 65 = 146.75 × 65 = ₹9,538.75.
- Breakeven at expiry = 22,600 - 53.25 = 22,546.75.
The plan.
- Entry: at the close of 3 November.
- Stop loss: a daily close below 22,600, below the range low. A close there means the range has broken, and the reason for the trade is gone.
- Target: keep about 70% of the credit.
- Time exit: 13 November.
What happened. Nifty did not bounce. On 6 November it closed at 22,520, below the range and below the sold strike. %K fell to 9.5 and stayed in the oversold zone, as the Stochastic does in a new downtrend. With 11 days left and IV up to 14.5% (IV usually rises when Nifty falls), the 22600 PE was ₹244.30 and the 22400 PE was ₹157.75. The trader bought back the spread for ₹86.55.
Result: (53.25 - 86.55) × 65 = -33.30 × 65 = -₹2,164.50 for one lot.
Nifty kept falling and closed at 22,400 on 13 November. Holding on would have made the loss about ₹4,095 by then, with more risk ahead. The stop worked as planned.
The lesson. The Stochastic gave a correct "oversold" reading, but the market was changing from a range into a downtrend. Every range ends with a breakout, and the Stochastic cannot tell you when. Your stop beyond the range edge is the only protection.
Tips and common mistakes¶
Tips
- First confirm a range: flat averages, clear support and resistance, or low ADX.
- Use the slow stochastic (14, 3, 3); the fast version is mostly noise.
- Take signals only at the edges of the range, and only crossovers inside the zones.
- Put the stop beyond the range edge, not just beyond the last candle.
- At range edges, selling premium with a credit spread is often a better fit than buying options, because you only need the price not to break out.
Common mistakes
- Using the Stochastic in a trend and fading every "overbought" reading.
- Acting on crossovers in the middle of the scale (between 20 and 80).
- Treating RSI and the Stochastic as two separate confirmations; they measure almost the same thing (see How Option Traders Use Indicators).
- Holding a range trade after the price closes outside the range.
- Selling naked options at the range edge instead of a defined-risk spread: breakouts can be large (see Naked vs Hedged Option Selling).
Combining the Stochastic with other indicators¶
| Pair the Stochastic with | What it adds | Example rule |
|---|---|---|
| ADX | Is there a range? | Use Stochastic signals only when ADX is below 20 |
| Bollinger Bands | Range edges | Sell at the upper band when %K crosses below %D above 80 |
| Pivot points | Intraday levels | Buy a crossover below 20 only at S1 or the central pivot |
| SMA 50 | Trend filter | If the 50 SMA is rising, take only the buy signals |
| Open interest | Option writers' levels | Sell a credit spread beyond the strike with the largest OI wall |
Do not combine the Stochastic with RSI, CCI or Williams %R as separate votes. Choose one oscillator and learn it well.
In the next chapter we study MACD, a momentum indicator built from two EMAs, which works better in trends than the Stochastic.
Key takeaways¶
- The Stochastic shows where the close sits in the recent high-low range:
%K = (Close - Lowest low) ÷ (Highest high - Lowest low) × 100. - %D is a 3-bar average of %K; their crossovers are the main signals.
- The slow stochastic (14, 3, 3) is the standard; the fast version gives far more noise.
- Buy on a %K cross above %D below 20, sell on a cross below %D above 80, and only at the edges of a range.
- In trends, the Stochastic stays overbought or oversold for weeks; do not fade it.
- Every range ends, so always place the stop beyond the range edge.
- In our examples, Stochastic trades made ₹2,875.50 and ₹3,594.50 and lost ₹2,164.50 on one lot each, before costs.
Check your understanding¶
- The 14-day highest high is 54,800, the lowest low is 53,800, and today's close is 54,600. What is %K?
- What do the three numbers in the setting 14, 3, 3 mean?
- Nifty is in a strong uptrend and %K has been above 80 for three weeks. Should you sell a bear call spread on the next bearish crossover? Why?
- You sell a Bank Nifty bear call spread for ₹207.35 (lot 30) and buy it back for ₹111.50. What is your profit for one lot?
- In Example 3, the Stochastic gave a correct oversold reading, but the trade lost money. Why?
Show answers
- Range = 54,800 - 53,800 = 1,000. %K = (54,600 - 53,800) ÷ 1,000 × 100 = 800 ÷ 1,000 × 100 = 80.
- 14 bars for the high-low range, 3 bars of smoothing for %K, and a 3-bar average of %K for %D.
- No. In a strong uptrend the Stochastic can stay above 80 for weeks, and bearish crossovers keep failing. The Stochastic should be used only in ranges.
- (207.35 - 111.50) × 30 = 95.85 × 30 = ₹2,875.50 (before costs).
- The range was ending. Nifty broke below the range, and in a new downtrend the Stochastic simply stays oversold. The Stochastic cannot predict a breakout, so the stop beyond the range edge had to close the trade.
Test yourself¶
Take the quiz for this chapter: 13 multiple choice questions, each with an explanation.