Calculate indicator without after hours data on a chart with after hours data in ThinkOrSwim

dwitenhafer

New member
VIP
Is there any conceivable way to calculate on indictor without after hours data on a chart with after hours data?

Some indicators can benefit from using after hours data and others are messed up by it. For instance, knowing the after hours high and low can be valuable. So can knowing the trend leading into the cash session. However, after hours data messes up ATR calculations on intraday charts at the beginning of the day. It also messes up ADX. So what I'd like to do is look at a chart with the after hours data included but see an ATR or ADX calculated without the after hours data. It sounds kinda impossible to me but you guys come up with crazy solutions sometimes.
 

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

You could try a 2 chart grid as you cannot have (or very difficult to code, if possible) the ADX and ATR values without afterhours on a chart that is set to display afterhours. You lose some screen space with the grid, but it may be worth it to you to have the values as you wanted.

The upper chart in the image is set without afterhours, no price subgraph and the indicator moved to the lower pane of the chart.

The lower chart in the image is the same script as in the upper with afterhours displayed to show the differences as you indicated in the ADX and ATR.

Ruby:
addlabel(1, "ADX " + ADX(), color.white);
addlabel(1, "ATR " + ATR(), color.yellow);
Capture.jpg
 
Last edited by a moderator:
That's brilliant! Not perfect, but functional. If only you could actually grab a label from another chart to populate on the current chart.

Thanks!
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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