NiftyLiveCharts Blog

we helps you to understand the Stock Market

How to Calculate Relative Strength Index?

11/02/2010 by admin

Calculation of RSI

A technical momentum indicator that compares the magnitude of recent gains to recent losses in an attempt to determine overbought and oversold conditions of an asset. It is calculated using the following formula:

RSI = 100 – 100
______
1 + RS
RS = Average of x days’ up closes / Average of x days’ down closes

As you can see from the chart below, the RSI ranges from 0 to 100. An asset is deemed to be overbought once the RSI approaches the 70 level, meaning that it may be getting overvalued and is a good candidate for a pullback. Likewise, if the RSI approaches 30, it is an indication that the asset may be getting oversold and therefore likely to become undervalued.

For each trading period an upward change (U) or downward change (D) is calculated. Up periods are characterized by the close being higher than the previous close,

U = closenow − closeprevious
D = 0

Conversely, a down period is characterized by the close being lower than the previous period’s (note that D is nonetheless a positive number),

U = 0
D = closeprevious − closenow

If the last close is the same as the previous, both U and D are zero. An average for U is calculated with an exponential moving average using a given N-period smoothing factor, and likewise for D. The ratio of those averages is the Relative Strength,

RS = { EMA[N] \; of \; U \over EMA[N] \; of \; D }

This is converted to a Relative Strength Index between 0 and 100,

 RSI = 100 - 100 \times { 1 \over 1 + RS }

This can be rewritten as follows to emphasize the way RSI expresses the up as a proportion of the total up and down (averages in each case),

 RSI = 100 \times { EMA[N]\;of\;U \over (EMA[N]\;of\;U) + (EMA[N]\;of\;D) }

The EMA, in theory, uses an infinite amount of past data. It is necessary either to go back far enough, or alternately at the start of data begin with a simple average of N periods instead,

AvgU_{initial} = { U_1 + U_2 + \cdots + U_N \over N }

and then continue from there with the usual EMA formula,

AvgU_{today} = \alpha \times U_{today} + (1-\alpha) \times AvgU_{yesterday}

The calculation of D is similar.

Filed Under: General Tagged With: calculating RSi, concept of RSi, relative strength index, RSI, RSI in stock MArket, STOCK MARKET

Follow us on FaceBook

Post Tags

assets Bank Nifty BankNifty Bank Nifty Breakdown Bank Nifty Breakout Breakdown Levels Breakout levels day trading Derivatives dividends DLF Ltd. is a sell finance financial planning forex forex indicators forex trading Future and Options futures and options future trading investing investment jaiprakash associates ltd . is a buy Levels loans money mutual funds nifty Nifty Breakdown Nifty Breakout options option trading put option Ranbaxy Laboratories Ltd is a buy Resistance shares stock STOCK MARKET STOCKS stock trading Support Tata Motors Ltd. is a buy TAX technical analysis trading trading in stocks

Categories

  • Daily Nifty Levels
  • Daily Stock Tips
  • Derivatives
  • Future and Options
  • General
  • Results
  • Share Market Basics
  • Short Headlines
  • Swap
  • Trade Like a Professional
  • Trading Basics
  • Trading price patterns
  • Weekly Support and resistance levels

Copyright © 2025 · Magazine Pro Theme on Genesis Framework · WordPress · Log in