OPEN-SOURCE SCRIPT

RSI with 3 Moving Averages (MA 20, MA 50, MA 200)

Remarks:
Moving Averages (MA 20, MA 50, MA 200):
SMA (Simple Moving Average) calculations are made for 20, 50 and 200 periods.
These moving averages are plotted in blue, orange and red respectively.
RSI (Relative Strength Index):
14-period RSI calculation is made.
The RSI value is plotted in blue.
Overbought (70) and oversold (30) levels are shown in red and green with horizontal lines.
Background Color Change:
When the RSI value is above the overbought level (above 70), the chart shows a red background color.
When the RSI value is below the oversold level (below 30), a green background color is shown.
Usage:
This code displays both the RSI indicator and the three moving averages (MA 20, MA 50, MA 200) on the same chart.
You can also track overbought and oversold levels and observe the corresponding background color changes.


Moving AveragesRelative Strength Index (RSI)

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Also on:

Disclaimer