RSI Clouds Indicator for ThinkorSwim

germanburrito

Active member
After testing thousands of indicators the RSI indicator has gain it place on my chart for good. This indicator plots rsi on the upper chart as cloud between values 70 and 30.

poAxoProp



Code:
input length = 14;
input price = close;
input rsiValue = 70;
input rsiValue2 = 80;
input rsiValue3 = 30;
input rsiValue4 = 20;
input smoothingType = {default Wilders, EMA};

def coeff = rsiValue / (100 - rsiValue);
def coeff2 = rsiValue2 / (100 - rsiValue2);
def coeff3 = rsiValue3 / (100 - rsiValue3);
def coeff4 = rsiValue4 / (100 - rsiValue4);

def chg = price - price[1];

def diff =  (length - 1) * (WildersAverage(Max(-chg, 0), length) * coeff - WildersAverage(Max(chg, 0), length));

def diff2 =  (length - 1) * (WildersAverage(Max(-chg, 0), length) * coeff2 - WildersAverage(Max(chg, 0), length));

def diff3 =  (length - 1) * (WildersAverage(Max(-chg, 0), length) * coeff3 - WildersAverage(Max(chg, 0), length));

def diff4 =  (length - 1) * (WildersAverage(Max(-chg, 0), length) * coeff4 - WildersAverage(Max(chg, 0), length));

def value = price + if diff >= 0 then diff else diff / coeff;

def value2 = price + if diff2 >= 0 then diff2 else diff2 / coeff2;

def value3 = price + if diff3 >= 0 then diff3 else diff3 / coeff3;

def value4 = price + if diff4 >= 0 then diff4 else diff4 / coeff4;

plot RevEngRSI = compoundValue(1, value[1], Double.NaN);

plot RevEngRSI2 = compoundValue(1, value2[1], Double.NaN);

plot RevEngRSI3 = compoundValue(1, value3[1], Double.NaN);

plot RevEngRSI4 = compoundValue(1, value4[1], Double.NaN);


revengRSI.SetDefaultColor(Color.red);
revengRSI2.SetDefaultColor(Color.red);

revengRSI3.SetDefaultColor(Color.green);
revengRSI4.SetDefaultColor(Color.green);

AddCloud(revengRSI,revengRSI2,Color.red);
AddCloud(revengRSI3,revengRSI4,Color.green);
 

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
380 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