ATR in option chain

metropical

New member
Probably not possible and more an add to the app itself, but ...
I'd like to see the ATR in the options chain rather than switch between tab 2 & tab 6.
I believe TT has this. I've suggested it to ToS tech. Time will tell.
Perhaps if it's not possible from a script, you could add your suggestion for same if you're interested.
 
Solution
@metropical Something like this...??? Default settings are length=14, averageType=AverageType.WILDERS...

Ruby:
def atr = reference ATR(length=14, averageType=AverageType.WILDERS);
AddLabel(yes, AsText(atr, NumberFormat.TWO_DECIMAL_PLACES), Color.WHITE);
AssignBackgroundColor(if atr > atr[1] then Color.DARK_GREEN else if atr < atr[1] then Color.DARK_RED else Color.YELLOW);

1737072539044.png
1737072612454.png
@metropical Something like this...??? Default settings are length=14, averageType=AverageType.WILDERS...

Ruby:
def atr = reference ATR(length=14, averageType=AverageType.WILDERS);
AddLabel(yes, AsText(atr, NumberFormat.TWO_DECIMAL_PLACES), Color.WHITE);
AssignBackgroundColor(if atr > atr[1] then Color.DARK_GREEN else if atr < atr[1] then Color.DARK_RED else Color.YELLOW);

1737072539044.png
1737072612454.png
 
Solution

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

that looks to be the ATR of the options. What I'd like is the ATR of the underlying.
Preferably in a box in Trade tab.

So you just want the ATR of the underlying where I showed how to see ATR of the Option contracts...??? We can't edit the columns of the underlying section itself, only the Option Chain columns... All that said, I have been unable to code an indicator that accurately reflects the ATR of the underlying via Thinkscript after several different attempts... There is always a great disparity between what is calculated manually compared to using standard ATR() calculations on the underlying itself... The crux of the issue is that we cannot pass a symbol to the ATR() Function... I have posted my last iteration below should anyone else desire to put time into the effort...

Ruby:
# This code gives inaccurate results
def tr = TrueRange(high(symbol=GetUnderlyingSymbol()), close(symbol=GetUnderlyingSymbol()), low(symbol=GetUnderlyingSymbol()));
def atr = WildersAverage(tr, 14);
AddLabel(yes, atr);

The best solution I can offer is the Chart below which displays the ATR on the Chart along with the Option Chain enabled on the Chart panel...

1738266366474.png
 
Last edited:

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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