Annualized ROI (Return on Investment) in Options Chain For ThinkOrSwim

TeFLoN

New member
Hello,
I've always been a lurker and never contributed (though I'm a paying member) and I figured some folks would really like this. I like to sell PUTS and CALLS. It just became to tedious to always determine what ROI my strike/options premium I was selling by punching it out on a calculator. So, I figured out a nice tidy custom script to add to your list on the options grid that immediately tells you in real time what your annualized ROI is going to be!

I shoot for 30% annualized on all of my trades. Therefore the numbers turn red if below 30% (you can change it if you like). So for this example if your thinking of selling the 17 Nov JPM Puts to get a 30% ROI you need to select the 134 strike with a .4 Delta. If that's too close for you then you need to move on! Its a beautiful way of seeing how much juice is in the options!!

Speaking of JUICE, look at the second example of PLTR! The ROI is INSANE at a .4sh Delta. Of course, its a week from ER, but you get the point!

I hope you guys like this. It was a sigh of relief to figure this out. Have fun!

For those of you less TOS savvy, select "layout" on the options grid and "customize". Then drag over a custom data line. Use the example below. You have to touch the little scroll "thingie" to copy and paste this code into:

Code:
# Custom Annualized ROI Script for thinkorswim
# Define the necessary variables
def optionPrice = bid; # Using the bid price as the option price
def daysToExpiration = GetDaysToExpiration() - 1; # Subtracting 3 days
def strikePrice = GetStrike();

# Calculate ROI
def ROI = (optionPrice * 365) / (daysToExpiration * strikePrice);

# Display ROI in the custom quote column
AddLabel(yes, "ROI: " + AsPercent(ROI), (if ROI >= 0.30 then Color.GREEN else Color.RED));
 

Attachments

  • Screen Shot 2023-10-29 at 5.42.37 PM.png
    Screen Shot 2023-10-29 at 5.42.37 PM.png
    541.9 KB · Views: 265
  • Screen Shot 2023-10-29 at 5.46.32 PM.png
    Screen Shot 2023-10-29 at 5.46.32 PM.png
    527.4 KB · Views: 248
  • Screen Shot 2023-10-29 at 5.51.41 PM.png
    Screen Shot 2023-10-29 at 5.51.41 PM.png
    557.8 KB · Views: 261
Last edited:

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

"def optionPrice = bid;"

this shows mistake, appreciate if you can figure it out.

thanks
the code " def optionprice =bid" giver error no such variable as Bid

Without any images or more detail, it is not possible to know where you went astray.
If I was to hazard a guess, I would say that you do not have extended hours checked.

Read more about the foibles of using bid / ask in scripts:
https://usethinkscript.com/threads/...s-watchlists-and-scans-for-thinkorswim.10626/
 
I copied this in and it looks great. Thank you.
Question...when I did it, I forgot to rename it. How can I rename it and edit the code?

thanks
 
I copied this in and it looks great. Thank you.
Question...when I did it, I forgot to rename it. How can I rename it and edit the code?

thanks

To rename a script:
1. right click on the study
2. select rename

To make a copy of a script
1. double click on the study
2. in the bottom right-hand corner, click on Save As
a6Ga2NL.png
 
Thread starter Similar threads Forum Replies Date
3AMBH Percentage % Price Return Watchlist Column for ThinkorSwim Custom 0
justAnotherTrader Portfolio Return Analysis for ThinkorSwim Custom 1

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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