About

RSI compares the size of recent price rises with the size of recent falls. It shows the result as one number between 0 and 100.

In KAGAMI it is called Relative Strength Index in the Indicators list. On the chart, its short name is RSI. It is free for every account.

What you see on the chart

A chart is made of bars, also called candles. Each bar covers the same amount of time, for example 15 minutes.

  • RSI opens in its own pane: a separate strip under the price chart.
  • A purple line moves up and down between 0 and 100.
  • Three dashed grey lines sit at 70, 50 and 30.
  • A light purple band fills the space between 30 and 70.
  • The name RSI shows at the top left of its pane, with the current number.

How traders often read it

  • RSI near 100 means recent rises were much bigger than recent falls. Near 0 means the opposite.
  • Many traders call RSI above 70 overbought: the price rose fast. Below 30, they call it oversold: the price fell fast.
  • Some traders watch whether RSI is above or below the middle line at 50.
  • Some traders compare highs. The price makes a new high, but RSI makes a lower one. This is called a divergence.
  • In a strong trend, RSI can stay high or low for many bars.
A daily chart of AAPL with the RSI pane under it. The purple RSI line goes above the 70 line. Later it drops under the 30 line and stays low for many days while the price falls. Then it climbs back above 50 as the price recovers.A daily chart of AAPL with the RSI pane under it. The purple RSI line goes above the 70 line. Later it drops under the 30 line and stays low for many days while the price falls. Then it climbs back above 50 as the price recovers.
AAPL, daily candles, with RSI (length 14) in its pane below. 1 — the price rose fast, and RSI goes above 70. 2 — the price keeps falling. RSI drops under 30 and stays low for many bars. 3 — the price recovers, and RSI goes back above the middle line at 50.
A daily chart of AAPL with the RSI pane under it. RSI stays above 70 for many days during a rise. Later, a thin dashed line joins two price highs and points up. A second dashed line joins the two RSI highs below them and points down.A daily chart of AAPL with the RSI pane under it. RSI stays above 70 for many days during a rise. Later, a thin dashed line joins two price highs and points up. A second dashed line joins the two RSI highs below them and points down.
AAPL, daily candles, with RSI (length 14). 1 — in a strong rise, RSI stays above 70 for many bars. 2 — later, the price makes a new high, above the high before it. The dashed line goes up. 3 — at the same time, RSI makes a lower high. Its dashed line goes down. This is a divergence.

An indicator only describes past prices. It cannot tell you what happens next.

The settings

Point at RSI at the top left of its pane. Click the gear icon (Settings). The Inputs tab shows:

  • Length — how many bars RSI looks back. It starts at 14. A smaller number makes the line jumpier. A bigger number makes it calmer.
  • Smoothing Line — the kind of average for an extra line: SMA, EMA or WMA.
  • Smoothing Length — how many bars that extra line averages. It starts at 14.

The extra line is called Smoothed MA. It is the average of RSI itself. It is off at first; turn it on in the Style tab.

RSI always uses the closing price of each bar. There is no setting to change that.

When it can mislead

  • 70 and 30 are not signals. RSI can stay above 70 or below 30 while a strong trend goes on.
  • The last bar is still forming. RSI moves with the price until that bar closes.
  • Too few bars. RSI needs more bars than its Length before it shows anything. Its first values are less settled.
  • Gaps count as one move. A jump after a night or a weekend is just one big rise or fall.
  • Timeframes differ. RSI on a 5-minute chart and on a daily chart can say very different things.
  • Quiet markets. When prices barely move, small moves can still swing RSI a lot.

Charts are for learning, not advice. Read our Risk Disclaimer.

An example

Open NASDAQ:AAPL on a daily chart. These numbers are made up.

  1. Say that over the last 14 days, rises averaged 2 and falls averaged 1.
  2. Rises divided by falls is 2 ÷ 1 = 2.
  3. RSI = 100 − 100 ÷ (1 + 2) = about 66.7.
  4. That is above 50 and below 70. The line sits in the purple band, near its top.
  5. Now say a few more strong up days come. The rises grow, the falls shrink, and RSI climbs above 70.
A purple curve that rises fast from 0 and then flattens out. A dot on it, above 2 on the bottom scale, shows 66.7, just under the 70 line.A purple curve that rises fast from 0 and then flattens out. A dot on it, above 2 on the bottom scale, shows 66.7, just under the 70 line.
The example as a picture. Across: the average rise divided by the average fall. Up: RSI. At 2 (rises averaged 2, falls averaged 1), RSI is about 66.7, in the purple band near its top. Past about 2.3, RSI is above 70. The bigger the rises are next to the falls, the closer RSI gets to 100.

Many traders would call that overbought. It only means recent rises were much bigger than recent falls.

Technical details

For readers who want the exact rules. Relative Strength Index is the chart's built-in TradingView study. The chart computes it in your browser from the bars KAGAMI sends.

The calculation

For each bar, using closing prices:

  1. change = close − close of the bar before
  2. up = change if the change is above 0, else 0. down = −change if the change is below 0, else 0.
  3. Average up and down with Wilder's smoothing over Length bars. The first average is the plain average of the first Length values. After that: average = (average of the bar before × (Length − 1) + new value) ÷ Length.
  4. RSI = 100 − 100 ÷ (1 + average up ÷ average down)
  5. If average down = 0, RSI is 100. Otherwise, if average up = 0, RSI is 0.
  6. Smoothed MA = an average of RSI (SMA, EMA or WMA, from Smoothing Line) over Smoothing Length bars.

The first RSI value comes on the bar Length bars after the first bar. With Length 14, that is the 15th bar. The chart shows values with 2 decimals.

Inputs

NameDefaultRangeWhat it does
Length141 to 2,000Bars in the up and down averages
Smoothing LineSMASMA, EMA, WMAThe kind of average for Smoothed MA
Smoothing Length141 to 10,000Bars in the Smoothed MA average

Lines and colours

PartLook
RSI linepurple #7E57C2, 1 pixel
Upper linedashed grey #787B86 at 70
Middle linedashed grey #787B86 at 50
Lower linedashed grey #787B86 at 30
Backgroundpurple #7E57C2 at 90 % transparency, between 70 and 30
Smoothed MAoff at first

These are the chart's own defaults. KAGAMI does not change them. You can change them in the Style tab.

When values change

  • The newest bar is still forming. Its RSI changes each time the chart refreshes: about every 15 seconds, or every 5 seconds on a seconds chart.
  • Closed bars keep their value. The bar that just closed gets its final value on the next refresh.
  • The start matters a little. Wilder's smoothing begins at the first loaded bar. So the first values depend on where the data starts. Values far from the start barely depend on it.

Timeframes

  • RSI works on every timeframe. It is computed on the bars of the timeframe on screen.
  • Seconds timeframes (1, 5, 10, 15 and 30 seconds) exist for crypto only. They reach back about 24 hours.
  • US stocks follow US market hours, 09:30 to 16:00 New York time. So a stock's first bar of the day often opens with a gap from the day before. Crypto trades all day, every day (times in UTC).

KAGAMI's own version

KAGAMI also has its own RSI, computed on KAGAMI's servers. It is not in the Indicators list. It is drawn only when a link opens KAGAMI with RSI already asked for. Its length comes from the link; you cannot change it on the chart.

  • Length: 14. A link may ask for another length above 0; it is cut to a whole number.
  • Maths: the same Wilder RSI as above. The first average is the plain average of the first Length ups and downs. If the average fall is exactly 0, RSI is 100.
  • Bars: the server reads the bars the chart asks for, plus 300 bars before them, and never more than 2,000 bars at once. So the line is usually already settled at the chart's left edge.
  • Too few bars: with Length bars or fewer, it draws nothing.
  • Rounding: values are rounded to 6 decimals.
  • The look: one line, 1 pixel, in its own pane at the bottom, with its own scale. Dashed grey lines at 30 and 70, 1 pixel. No line at 50, no background, no Smoothed MA.
  • Refresh: about every 15 seconds, like the chart. The newest bar is included while it is still forming.
PartDark themeLight theme
RSI lineindigo #6366F1indigo #4F46E5
Lines at 30 and 70rgba(139,144,168,0.55)rgba(91,96,122,0.55)

Differences from the chart's built-in version

The maths is the same in both: Wilder's smoothing, started with a plain average. With the same bars and Length, both give the same values. The differences:

  • Where it is computed. KAGAMI's own: on KAGAMI's servers. Built-in: in your browser.
  • Where it starts. KAGAMI's own: 300 bars before what the chart shows. Built-in: at the first bar the chart loaded. Only the first values differ.
  • Rounding. KAGAMI's own rounds to 6 decimals. The built-in shows 2 decimals.
  • The look. KAGAMI's own: an indigo line, lines at 30 and 70 only, no background. Built-in: a purple line, lines at 70, 50 and 30, a purple band.
  • Settings. KAGAMI's own takes its length from the link only. The built-in has Length, Smoothing Line and Smoothing Length.
  • The extra line. Only the built-in has Smoothed MA.

Edge cases

  • Too few bars. With Length bars or fewer, there is no RSI yet.
  • No falls at all. If the price has not fallen once since the averages started, RSI is 100.
  • No rises at all. If the price has only fallen since the averages started, RSI is 0.
  • Flat prices. A bar with the same close as the bar before adds 0 to both averages. Over a long flat stretch, both averages shrink, but RSI keeps the balance from before.
  • Gaps. A night or weekend gap is one change, often a big one. It can move RSI sharply on the first bar after it.
  • Missing bars. If no trade happened in a bar's time, the data may have no bar for it. RSI then simply uses the next bar.