Author Message:
RSI TREND Filter on Chart
RSI scaled to fit on chart instead of oscillator, Trend Analysis is easy and Hidden Divergence is revealed using this indicator. This indicator is an aim to reduce confusing RSI Situations. The Oversold and Overbought lines help to determine the price conditions so its easy to avoid Traps.
Oversold and Overbought conditions are marked on Chart to make it useful to confirm a Buy or Sell Signals.
RSI 50 level is plotted with reference to EMA50 and Oversold and Overbought Conditions are calculated accordingly.
- Uptrend: RSI Cloud / Candles above RSI 50 Level
- Down Trend: RSI Cloud / Candles below RSI 50 Level
- Sideways : Candles in the Gray Area above and below RSI 50 Level
- Default RSI (14) : is the Candlestick pattern itself
CODE:
CSS:
#// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
#// © traderharikrishna
#// Idea and Code by @traderharikrishna
#indicator("RSI TREND FILTER",overlay=true)
input showBand = yes;
input src = close;
input MovAvg = AverageType.EXPONENTIAL;
input atrLength = 100;
input rsiLength = 14; # 'RSI LENGTH'
input rsiMovAvgLength = 100; # 'RSI 50 level'
input level2 = 10; # 'RSI LEVEL2'
input level3 = 40; # 'RSI LEVEL3'
input level5 = 50; # 'RSI LEVEL5'
def na = Double.NaN;
def nATR = ATR(Length=atrLength);
def orsi = RSI(Price=src,LENGTH=rsiLength);
def adjrsi = src + nATR * orsi / 100;
def rma = MovingAverage(MovAvg, adjrsi,rsiMovAvgLength);
def r1 = adjrsi;
plot r2 = rma;
r2.AssignValueColor(if open>rma then Color.CYAN else
if open<rma then Color.MAGENTA else Color.WHITE);
AddCloud(r1, r2, Color.DARK_GREEN, Color.DARK_RED);
def rmau = rma + nATR * level2/10;
def rmal = rma - nATR * level2/10;
def u = rmau;
def l = rmal;
def rmau3 = rma + nATR * level3/10;
def rmal3 = rma - nATR * level3/10;
def o8 = rmau3;
def o2 = rmal3;
def rmau5 = rma + nATR * level5/10;
def rmal5 = rma - nATR * level5/10;
def ul = rmau5;
def ll = rmal5;
#-- Clouds
AddCloud(u,l, Color.DARK_GRAY);
AddCloud(if !showBand then na else ul,o8, Color.PLUM);#CreateColor(232,4,205));#, 45),title='OverBought')
AddCloud(if !showBand then na else o2,ll, Color.DARK_GREEN);#CreateColor(9,198,15));#, 53),title='OverSold')
#--- END CODE
Last edited by a moderator: