Multiple tickers on same chart

Shaco

Member
Is it possible to get the RSI values of multiple tickers to show up on 1 chart in the lower study? If someone can please point me to a code/post how to extract the RSI value of a ticker that would be awesome. For example:

declare lower;

get RSI (TSLA);
get RSI (AAPL);

-------------------------------------- Updated ---------------

So I just found this code to plot the differences between 2 tickers closing prices:

def Symbol_AAPL = close(symbol="AAPL");
plot difference = close - Symbol_AAPL;

Now, how can i find the RSI differences between the 2 tickers? I'll look some more ..

I found the original post that I visited 2 years ago and post my question there.

https://usethinkscript.com/threads/rsm-indicator-for-thinkorswim.5407/page-5
 
Last edited:
Solution
Is it possible to get the RSI values of multiple tickers to show up on 1 chart in the lower study? If someone can please point me to a code/post how to extract the RSI value of a ticker that would be awesome. For example:

declare lower;

get RSI (TSLA);
get RSI (AAPL);

-------------------------------------- Updated ---------------

So I just found this code to plot the differences between 2 tickers closing prices:

def Symbol_AAPL = close(symbol="AAPL");
plot difference = close - Symbol_AAPL;

Now, how can i find the RSI differences between the 2 tickers? I'll look some more ..

I found the original post that I visited 2 years ago and post my question there...
Is it possible to get the RSI values of multiple tickers to show up on 1 chart in the lower study? If someone can please point me to a code/post how to extract the RSI value of a ticker that would be awesome. For example:

declare lower;

get RSI (TSLA);
get RSI (AAPL);

-------------------------------------- Updated ---------------

So I just found this code to plot the differences between 2 tickers closing prices:

def Symbol_AAPL = close(symbol="AAPL");
plot difference = close - Symbol_AAPL;

Now, how can i find the RSI differences between the 2 tickers? I'll look some more ..

I found the original post that I visited 2 years ago and post my question there.

https://usethinkscript.com/threads/rsm-indicator-for-thinkorswim.5407/page-5


RSI has a price parameter, so a price from a different stock can be used as an input parameter.

this draws 2 RSI's, from 2 different stocks
it draws a histogram below the RSIs


Code:
# multiple_rsi_00

declare lower;

#def bn = barnumber();
#def na = Double.NaN;
#def diffday = if GetDay() != GetDay()[1] then 1 else 0;

input Symbol1 = "TSLA";
def s1 = close(Symbol1);

input Symbol2 = "AAPL";
def s2 = close(Symbol2);

def rsi1 = rsi(price = s1).rsi;
def rsi2 = rsi(price = s2).rsi;

plot z1 = rsi1;
z1.SetDefaultColor(Color.cyan);
z1.hidebubble();

plot z2 = rsi2;
z2.SetDefaultColor(Color.yellow);
z2.hidebubble();

addlabel(1, Symbol1, z1.TakeValueColor());
addlabel(1, Symbol2, z2.TakeValueColor());

def diff = rsi1 - rsi2;

plot z3 = diff;
z3.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
z3.AssignValueColor(if diff > 0 then color.green else color.red);
z3.setlineweight(2);
z3.hidebubble();
#


Xhm9QGA.jpg
 
Solution

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
373 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