Skip to content

हिंदी में पढ़ें

CCI and Williams %R

In the last chapter, the Donchian Channel showed us when the price makes a new high or low. In this chapter we study two oscillators that tell us how stretched the price is. The Commodity Channel Index (CCI) measures how far the price is from its own average. Williams %R measures where the close sits inside the recent high-low range. Both are fast, both are popular on Indian charting platforms, and both are easy to misuse.

Video: CCI and Williams %R (3:10)

What you will learn

  • What CCI and Williams %R measure, with a small hand calculation of each
  • How to read the +100 and -100 levels of CCI and the -20 and -80 levels of %R
  • How they differ from RSI and the stochastic oscillator
  • Settings for Nifty and Bank Nifty intraday, swing trades and stocks
  • Three complete option trades: a bull put spread, an intraday call and a bear call spread that was stopped out

What CCI measures

The Commodity Channel Index (CCI) was created by Donald Lambert in 1980 for commodity futures. Today traders use it on every market.

CCI answers one question: how far is the price today from its average of the last N days, compared with how far it usually is?

  • A large positive CCI means the price is far above its average: a strong upward push.
  • A large negative CCI means the price is far below its average: a strong downward push.
  • A CCI near 0 means the price is close to its average.

CCI has no upper or lower limit. Most of the time it stays between -100 and +100. Moves beyond these levels show unusual strength or weakness.

The CCI formula in plain words

CCI uses the typical price of each bar, which is the average of its high, low and close.

Typical price (TP) = (High + Low + Close) ÷ 3

CCI = (TP - Average of TP over N bars) ÷ (0.015 × Mean deviation)

The mean deviation is the average distance of each TP from the average TP, ignoring plus and minus signs. Lambert chose the number 0.015 so that most CCI values fall between -100 and +100. The usual setting is N = 20.

A small CCI calculation

To keep it short, we use N = 5. The numbers are an example for Nifty.

Day High Low Close Typical price Distance from average (22,900)
1 22,900 22,780 22,840 22,840 60
2 22,950 22,830 22,920 22,900 0
3 22,980 22,860 22,890 22,910 10
4 22,940 22,810 22,830 22,860 40
5 23,060 22,880 23,030 22,990 90

Step by step for day 5:

  1. Average of the five typical prices = (22,840 + 22,900 + 22,910 + 22,860 + 22,990) ÷ 5 = 1,14,500 ÷ 5 = 22,900.
  2. Mean deviation = (60 + 0 + 10 + 40 + 90) ÷ 5 = 200 ÷ 5 = 40.
  3. CCI = (22,990 - 22,900) ÷ (0.015 × 40) = 90 ÷ 0.6 = 150.

A CCI of 150 is above +100. On day 5 Nifty pushed well above its recent average.

What Williams %R measures

Williams %R (read as "Williams percent R") was created by the trader Larry Williams. It shows where today's close sits inside the high-low range of the last N bars.

  • A close at the very top of the range gives %R = 0.
  • A close at the very bottom of the range gives %R = -100.
  • A close in the middle gives %R = -50.

So %R always moves between 0 and -100. The minus sign is only a convention. Readings from -20 to 0 are called overbought (the close is near the top of the range). Readings from -80 to -100 are called oversold (the close is near the bottom of the range).

The %R formula in plain words

Williams %R = -100 × (Highest high - Close) ÷ (Highest high - Lowest low)

The highest high and lowest low are taken over the last N bars. The usual setting is N = 14.

A small %R calculation

Use the same five days as above, with N = 5.

  • Highest high of days 1 to 5 = 23,060.
  • Lowest low of days 1 to 5 = 22,780.
  • Close of day 5 = 23,030.

%R = -100 × (23,060 - 23,030) ÷ (23,060 - 22,780) = -100 × 30 ÷ 280 = -10.71

A %R of -10.71 is above -20, in the overbought zone. The close is near the top of the five-day range.

Williams %R and the stochastic are cousins

The fast stochastic %K uses the same high-low range, but measures the close from the bottom: %K = 100 × (Close - Lowest low) ÷ (Highest high - Lowest low). For day 5 above, %K = 100 × 250 ÷ 280 = 89.29. Williams %R is simply %K minus 100: 89.29 - 100 = -10.71. The Stochastic Oscillator usually adds smoothing, so it is slower and smoother than %R.

How they differ from RSI and the stochastic

Item RSI Stochastic Williams %R CCI
Built from Average up closes vs average down closes Close inside the high-low range, smoothed Close inside the high-low range, not smoothed Typical price vs its own average
Range 0 to 100 0 to 100 0 to -100 No limit, mostly -200 to +200
Usual levels 70 and 30 80 and 20 -20 and -80 +100 and -100
Default setting 14 14, 3, 3 14 20
Speed Medium Medium Fast Fast
Best use Momentum and divergence Turns inside a range Fast turns, pullbacks in a trend Strength of a push, breakouts of momentum

Two points matter most.

  1. %R and the stochastic are almost the same thing. Do not put both on your chart. Choose one.
  2. CCI has no ceiling. A CCI of +250 is possible in a strong trend. This makes CCI good at showing how strong a push is, while %R only says the close is near the top of the range.

How to read CCI on a chart

The chart below shows an example of Nifty with CCI 20 in the lower panel. The dotted lines are +100 and -100.

Nifty daily chart (example) with CCI 20 in the lower panel: CCI rises above +100 during the July rally, falls below -100 during the August fall, and moves between the two levels in the sideways months

Look at three things.

  1. CCI above +100 during the July rally. The price kept closing far above its 20-day average. This is strength, not a reason to sell.
  2. CCI below -100 during the August fall. The price stayed far below its average for weeks. The fall was strong.
  3. CCI between -100 and +100 in September and October. The market moved sideways, and CCI swung around 0.

Many traders use the zero line as a simple trend guide: CCI above 0 means the price is above its average, and CCI below 0 means it is below.

How to read Williams %R on a chart

Here is the same Nifty chart with Williams %R 14. The dotted lines are -20 and -80.

Nifty daily chart (example) with Williams %R 14 in the lower panel: %R stays near 0 during the July rally, stays below -80 during the August fall, and swings between the two levels in the sideways months

The most important lesson is in July and August. In the strong rally, %R stayed near 0 for weeks. In the strong fall, it stayed below -80 for weeks. A trader who sold every time %R went above -20 would have lost money again and again in July.

Overbought is not a sell signal in a trend

In a strong uptrend, %R stays in the overbought zone and CCI stays above +100. That shows strength. Use the overbought and oversold zones for selling and buying only when the market is in a range, or when you trade pullbacks in the direction of the trend.

Settings

Use Chart CCI Williams %R Comment
Nifty or Bank Nifty intraday 5 minute 20 14 Fast and noisy; use with a trend filter
Nifty or Bank Nifty intraday 15 minute 20 14 Fewer, cleaner signals
Swing trades Daily 20 14 The standard settings
Smoother swing signals Daily 30 to 50 21 Fewer signals
Stocks Daily 20 14 Stocks have more gaps, so expect more extreme readings

Some traders use 14 for CCI, the same as RSI. Some also mark +200 and -200 on CCI for very extreme readings. Keep the default settings until you have tested a change; changing settings to fit the last few trades is a common trap.

A practical point for intraday charts: CCI 20 needs 20 candles before it shows a value. If your chart shows only today, a 5-minute CCI starts at about 10:50 am. Most platforms load earlier days, so you see it from the first candle.

Signals

CCI signals

Signal What you see What it suggests
Momentum buy CCI crosses above +100 A strong upward push has started (Lambert's original rule)
Momentum exit CCI falls back below +100, or below 0 The push is fading
Momentum sell CCI crosses below -100 A strong downward push has started
Trend guide CCI above or below 0 The price is above or below its average
Range turn CCI goes below -100, then climbs back above -100 in a sideways market The fall is over for now
Divergence Price makes a higher high, CCI makes a lower high The rise is losing strength

Williams %R signals

Signal What you see What it suggests
Pullback buy in an uptrend Price is above a rising 50-day average, %R falls below -80, then crosses back above -80 The dip may be over
Pullback sell in a downtrend Price is below a falling 50-day average, %R rises above -20, then crosses back below -20 The bounce may be over
Range sell In a range, %R crosses down through -20 near the top of the range A turn down is possible
Range buy In a range, %R crosses up through -80 near the bottom of the range A turn up is possible
Trend strength %R stays between -20 and 0 for many bars A strong uptrend; do not sell it

What CCI and %R are NOT good at

  • Telling you the trend. Both are oscillators. Use a moving average or ADX to know whether the market is trending.
  • Calm, steady trends. %R stays pinned near 0 or -100, and gives one false "reversal" signal after another.
  • Exact timing. The price can stay overbought much longer than your option premium can survive time decay.
  • Very short charts. On 1-minute or 3-minute charts, both indicators flip so often that costs eat the profits.

Trade example 1: Williams %R pullback with a bull put spread

This is a swing trade on the Nifty daily chart with the monthly expiry.

The setup

Nifty had been in an uptrend since August, well above its rising 50-day simple moving average (SMA). In late October it pulled back from about 23,250 to a low of 22,790. Williams %R fell to about -96, deep in the oversold zone. On 3 November 2026, Nifty closed at 23,000 and %R crossed back above -80. The 50-day SMA was at 22,721, below the price, so the uptrend was still intact.

Nifty daily chart (example) with the 50-day SMA and Williams %R 14: a pullback in an uptrend, %R crossing back above -80 on 3 November, a 22750/22550 bull put spread sold on 4 November, the stop at a close below 22,790, and the exit on 13 November near 23,300

The market view and the option strategy

The view is: the uptrend resumes, or at least Nifty does not fall below the pullback low of 22,790. We do not need a big rise. That is a perfect job for a bull put spread, a credit spread that earns money if Nifty stays above the short strike. Time decay works for us, and the bought put limits the loss.

Strike and expiry

  • Date: 4 November 2026, Nifty near 23,050.
  • Expiry: 23 November 2026 (monthly, 19 days away).
  • Sell 22750 PE (below the pullback low) and buy 22550 PE.
  • Lot size: 65.
Leg Action Strike Premium Cash flow for 65
1 Sell 22750 PE ₹146.35 Receive ₹9,512.75
2 Buy 22550 PE ₹108.55 Pay ₹7,055.75
Net credit ₹37.80 Receive ₹2,457
  • Maximum profit = 37.80 × 65 = ₹2,457, if Nifty is above 22,750 at expiry.
  • Maximum loss = (200 - 37.80) × 65 = 162.20 × 65 = ₹10,543, if Nifty is below 22,550 at expiry.
  • Breakeven at expiry = 22,750 - 37.80 = 22,712.20.

Payoff diagram of the Nifty 22750/22550 bull put spread sold for a credit of 37.80: maximum profit ₹2,457 above 22,750, breakeven at 22,712.20, maximum loss ₹10,543 below 22,550

The maximum loss is about four times the maximum profit. That is normal for a credit spread with a high chance of profit. It also means the stop loss is not optional.

The rules

  • Entry: 4 November, the day after %R crossed back above -80.
  • Stop loss: a daily close below 22,790, the pullback low. If that had happened about two days later, the spread would have been worth about ₹61.30, a loss of about ₹1,528.
  • Target: buy back the spread when about 60% to 70% of the credit is earned.
  • Time exit: close by 18 November, a few days before expiry, to avoid the fast gamma moves of the last days.

What happened

Nifty moved up steadily and never closed near 22,790. On 13 November, with Nifty near 23,300 and 10 days left, the spread was worth only ₹12.85.

Leg Entry Exit (13 Nov) P&L per unit
Sell 22750 PE ₹146.35 ₹30.05 +₹116.30
Buy 22550 PE ₹108.55 ₹17.20 -₹91.35
Spread ₹37.80 credit ₹12.85 to buy back +₹24.95

Profit = 24.95 × 65 = ₹1,621.75, before costs. That is 66% of the maximum profit, earned in 9 days. We bought the spread back instead of waiting 10 more days for the last ₹835.

Trade example 2: CCI momentum breakout on a 5-minute chart

This is an intraday trade on Nifty with the weekly expiry.

The setup

On Wednesday, 2 December 2026, Nifty moved sideways between about 23,185 and 23,265 for the first two hours. At 11:35 am, a strong green candle closed at 23,255 and CCI 20 crossed above +100. This is Lambert's momentum buy: the price has jumped well above its recent average.

Nifty 5-minute chart (example) with CCI 20: a sideways morning between 23,185 and 23,265, CCI crossing above +100 at 11:35 am, a 23250 CE bought at 11:40 am, a rise to about 23,390, and an exit at 2:15 pm when CCI closes below 0 near 23,350

The market view and the option strategy

The view is bullish for the next few hours. Intraday moves are small, so we want an option that gains quickly from a rise. An ATM call has a delta of about 0.5, so it gains about half of every point Nifty rises. For a few hours, time decay is small. So we buy a plain call.

Strike and expiry

  • Date and time: 2 December 2026, 11:40 am, Nifty at 23,255.
  • Expiry: 8 December 2026 (weekly, 6 days away).
  • Buy one lot of the 23250 CE at ₹171.25.
  • Cost = 171.25 × 65 = ₹11,131.25.

The rules

  • Entry: at the open of the candle after the CCI cross, 11:40 am.
  • Stop loss: a 5-minute close below 23,185, the low of the morning range. At that level the call would be worth about ₹136.05, a loss of about ₹2,288.
  • Exit: when CCI closes below 0, the push is over.
  • Time exit: 3:00 pm at the latest.

What happened

Nifty rose steadily, and CCI stayed above +100 for almost two hours. Nifty reached about 23,390 after 1:30 pm, then slipped back. The 2:15 pm candle closed at 23,350 with CCI below 0, so we sold the call at ₹219.10.

Profit = (219.10 - 171.25) × 65 = 47.85 × 65 = ₹3,110.25, before costs.

Notice that we did not sell when CCI first fell below +100 at about 1:50 pm. The rule was "exit below 0", not "exit below +100". Write your exit rule before the trade, and follow the one you wrote.

Trade example 3: Williams %R at a range top, stopped out

This is a swing trade on Bank Nifty with the monthly expiry, and this time the trade loses money.

The setup

From mid-October, Bank Nifty moved in a range between about 53,300 and 54,600. It touched 54,600 twice and turned down both times. In late November it rose to the top of the range again, and %R went above -20. On 30 November 2026, Bank Nifty closed at 54,350 and %R fell back below -20. This is the range sell signal.

Bank Nifty daily chart (example) with Williams %R 14: a range between 53,300 and 54,600, %R falling below -20 on 30 November at the range top, a 54700/55100 bear call spread sold on 1 December, and a close at 54,880 on 4 December that hits the stop, after which Bank Nifty keeps rising

The market view and the option strategy

The view is: Bank Nifty stays below the range top of 54,600 for the next few weeks. A bear call spread fits: sell a call above resistance and buy a higher call for protection. Bank Nifty has only a monthly expiry, so we use the December contract.

Strike and expiry

  • Date: 1 December 2026, Bank Nifty near 54,350.
  • Expiry: 29 December 2026 (monthly, 28 days away).
  • Sell 54700 CE at ₹823.00 and buy 55100 CE at ₹619.20.
  • Lot size: 30.
  • Net credit = 823.00 - 619.20 = ₹203.80, or 203.80 × 30 = ₹6,114.
  • Maximum loss = (400 - 203.80) × 30 = 196.20 × 30 = ₹5,886.
  • Breakeven at expiry = 54,700 + 203.80 = 54,903.80.

The rules

  • Stop loss: a daily close above 54,700, above the range top.
  • Target: buy back the spread at about 50% of the credit.
  • Time exit: close a week before expiry.

What happened

Bank Nifty did not turn down this time. It closed at 54,480 and 54,590 on the next two days, and on 4 December it closed at 54,880. The range had broken, and the stop was hit.

Leg Entry Exit (4 Dec) P&L per unit
Sell 54700 CE ₹823.00 ₹1,073.60 -₹250.60
Buy 55100 CE ₹619.20 ₹833.75 +₹214.55
Spread ₹203.80 credit ₹239.85 to buy back -₹36.05

Loss = 36.05 × 30 = ₹1,081.50, before costs.

Two lessons come from this trade.

  • The bought call did its job. A naked sold 54700 CE would have lost (1,073.60 - 823.00) × 30 = ₹7,518 by the same day.
  • The stop saved more than it cost. Bank Nifty kept rising to about 55,350 a week later. If we had held the spread to expiry with Bank Nifty above 55,100, we would have lost the full ₹5,886.

With 25 days left, the spread moved slowly, so the loss at the stop was small. That is a quiet advantage of using monthly spreads for swing trades.

Range signals stop working when the range breaks

A range sell signal at the top of a range is a bet that the range continues. Every range ends one day, often with a sharp move through the edge. Always hedge a sold option and always set a stop just beyond the range.

Tips

  • First decide whether the market is trending or ranging; then choose the signal that fits.
  • In a trend, use %R or CCI only to time pullbacks in the direction of the trend.
  • In a range, use the overbought and oversold zones, but always with a stop beyond the range.
  • For intraday CCI breakouts, the move can fade fast, so plan a clear exit such as CCI below 0.
  • Credit spreads fit oscillator signals well, because you only need the price not to go too far.
  • Use the same settings for months before you judge them.

Common mistakes

  • Selling every overbought reading. In a strong trend, overbought can last for weeks.
  • Using %R and the stochastic together. They measure the same thing and will always agree.
  • Reading CCI +100 as a ceiling. CCI has no upper limit. A move above +100 is a sign of strength, not of an end.
  • Buying far OTM weekly options on an oscillator signal. Oscillator turns are often small moves. A far OTM option needs a big move.
  • Ignoring the stop after a range breaks. As example 3 showed, the stop keeps a small loss small.

Combining CCI and Williams %R with other indicators

  • Trend filter: use the 50-day SMA or an EMA and take only signals in the trend direction.
  • Trend strength: ADX below 20 suggests a range, where %R zone signals work better.
  • Breakouts: CCI crossing +100 together with a Donchian breakout makes a stronger momentum signal.
  • Intraday fair value: for intraday CCI trades, many traders also want the price above VWAP.
  • Volatility: Bollinger Bands show whether the price is stretched by volatility, not only by momentum.

In the next chapter we change the candles themselves: Heikin Ashi Candles smooth the price to make trends easier to see.

Key takeaways

  • CCI = (Typical price - its N-bar average) ÷ (0.015 × mean deviation); the usual N is 20 and the key levels are +100 and -100.
  • Williams %R = -100 × (Highest high - Close) ÷ (Highest high - Lowest low); the usual N is 14 and the key levels are -20 and -80.
  • %R is the fast stochastic %K minus 100, so do not use both.
  • CCI has no limit and shows the strength of a push; %R shows where the close sits in the recent range.
  • In trends, overbought and oversold readings show strength; use them for pullback entries, not for fading the trend.
  • In our examples, a bull put spread made ₹1,621.75, an intraday call made ₹3,110.25, and a Bank Nifty bear call spread lost ₹1,081.50 when the range broke.

Check your understanding

  1. The last five typical prices are 23,100, 23,140, 23,120, 23,080 and 23,210. What is the mean deviation, and what is the 5-bar CCI?
  2. The 14-day highest high is 54,600, the lowest low is 53,300 and the close is 54,340. What is Williams %R, and which zone is it in?
  3. Nifty is in a strong uptrend and %R has stayed above -20 for eight days. A friend wants to buy puts because "%R is overbought". What is wrong with this idea?
  4. You sell a 22750/22550 bull put spread for ₹37.80 and buy it back for ₹12.85 (lot 65). What is the profit?
  5. Why is it a bad idea to keep both Williams %R and the stochastic oscillator on the same chart?
Show answers
  1. Average TP = (23,100 + 23,140 + 23,120 + 23,080 + 23,210) ÷ 5 = 1,15,650 ÷ 5 = 23,130. Distances from 23,130: 30, 10, 10, 50 and 80, so the mean deviation = 180 ÷ 5 = 36. CCI = (23,210 - 23,130) ÷ (0.015 × 36) = 80 ÷ 0.54 = 148.15.
  2. %R = -100 × (54,600 - 54,340) ÷ (54,600 - 53,300) = -100 × 260 ÷ 1,300 = -20. It is right at the -20 line, the edge of the overbought zone.
  3. In a strong trend, %R can stay overbought for weeks. Overbought here shows strength, not a top. Buying puts against the trend is likely to lose money; a better idea is to wait for a pullback and trade in the trend direction.
  4. Profit = (37.80 - 12.85) × 65 = 24.95 × 65 = ₹1,621.75 before costs.
  5. %R is the fast stochastic %K minus 100. Both measure the close inside the same high-low range, so they give the same signals and add no new information.

Test yourself

Take the quiz for this chapter: 12 multiple choice questions, each with an explanation.

Let's Check Your Knowledge of CCI and Williams %R