RSI TREND FILTER - Band for ThinkOrSwim

samer800

Moderator - Expert
VIP
Lifetime
bqXwXDk.png

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
Disclaimer: Use Solely at your own Risk.

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:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

@samer800 Hi, I tried converting this to MTF; Could you assist and help me?

Code:
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'
input agg = AggregationPeriod.DAY;
def c = close(period = agg);

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(period = agg)>rma then Color.CYAN else
                    if open (period = agg)<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')
 
@samer800 Hi, I tried converting this to MTF; Could you assist and help me?

Code:
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'
input agg = AggregationPeriod.DAY;
def c = close(period = agg);

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(period = agg)>rma then Color.CYAN else
                    if open (period = agg)<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')
?
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
399 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top