Programming a plot using multiple charts

DannyKaye1990

New member
Hey everybody,

I’m curious as to whether or not there is a way that I can have an arrow plotted on a chart that uses multiple charts.

What I mean is for instance, when the NQ closes below it’s open, the RTY closes below its open and the ES closes below its open, there is a down arrow plotted at the top of the candle on the ES. Is that possible on TOS? Would love to use this not only for the other markets but for other charts as well like the NYA.

Specifically, I want an indicator that says basically, “when the $TICK, $TIKND, $TIKSP close below their open on a 1 minute chart, and the NYA closes above its open on a 1 minute chart, there is a down arrow that is plotted on the ES on a 1 minute. The opposite is true as well.”

Thanks!
 
Last edited:
Solution
Could I add multiple charts to that? Declare lower the NQ, the NYA, the $TICK etc?
Yes. Just add new lines for the "def symbol" line (add a number to it for example) and specify new symbols. You can use the OHLC of any symbol, you can also specify the TF like this:

Ruby:
input symbol = "/NQ";
input aggPeriod = AggregationPeriod.DAY;

def nqDayHigh = high(symbol, period = aggPeriod);

plot NQHIGH = naDayHigh;
Hey everybody,

I’m curious as to whether or not there is a way that I can have an arrow plotted on a chart that uses multiple charts.

What I mean is for instance, when the NQ closes below it’s open, the RTY closes below its open and the ES closes below its open, there is a down arrow plotted at the top of the candle on the ES. Is that possible on TOS? Would love to use this not only for the other markets but for other charts as well like the NYA.

Specifically, I want an indicator that says basically, “when the $TICK, $TIKND, $TIKSP close below their open on a 1 minute chart, and the NYA closes above its open on a 1 minute chart, there is a down arrow that is plotted on the ES on a 1 minute. The opposite is true as well.”

Thanks!
You can reference other charts/symbols as follows:

Ruby:
declare lower;
input symbol = "/NQ";
plot Data = close(symbol);
 

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

Could I add multiple charts to that? Declare lower the NQ, the NYA, the $TICK etc?
Yes. Just add new lines for the "def symbol" line (add a number to it for example) and specify new symbols. You can use the OHLC of any symbol, you can also specify the TF like this:

Ruby:
input symbol = "/NQ";
input aggPeriod = AggregationPeriod.DAY;

def nqDayHigh = high(symbol, period = aggPeriod);

plot NQHIGH = naDayHigh;
 
Solution
Yes. Just add new lines for the "def symbol" line (add a number to it for example) and specify new symbols. You can use the OHLC of any symbol, you can also specify the TF like this:

Ruby:
input symbol = "/NQ";
input aggPeriod = AggregationPeriod.DAY;

def nqDayHigh = high(symbol, period = aggPeriod);

plot NQHIGH = naDayHigh;
How do I specify the time frame to be 1 minute? I want the alert to go off when I have 3 specific charts closing the minute with a red candle and 1 specific chart closing the minute with a green candle.
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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