The Relative Strength Index is a momentum indictator that compares the strength of recent price movements, increases compared to decreases. The formula is as follows:

RS = Average of n days closes up/Average of n days closes down.

RSI = 100- (100/1+RS)

As we can see below, there is correlation between the price and the RSI:

Relative Strength Index

A value below 30 is considered oversold while a value above 70 is considered overbought.