Alert that Stock Price is within 5% of a Sold Call

Luv2H8ToSH82Luv

New member
How would one tailor ToS to:

Broadcast an alert when the stock price, of an active sold call, has crossed a threshold of 5% under the strike price?
 
Solution
This would require a manual entry of an alert on your chart because there is no way to code Thinkorswim to perform this task for you automagically via Thinkscript... You know your strike price so you would need to calculate the strike - 5% and then create the alert... I can't think of an easier method, unfortunately... We have to live within the limits of the platform...

If anyone else has a better solution, I'm sure they will post it here...
This would require a manual entry of an alert on your chart because there is no way to code Thinkorswim to perform this task for you automagically via Thinkscript... You know your strike price so you would need to calculate the strike - 5% and then create the alert... I can't think of an easier method, unfortunately... We have to live within the limits of the platform...

If anyone else has a better solution, I'm sure they will post it here...
 
Solution
As a programmer, I would first create a calculated column of Strike - 5%. Once the column is created it can be used for filtering or sorting. Is it possible to make calculated columns? I guess this also requires the ability to programmatically refer to existing options positions, so is that possible as well?
 
As a programmer, I would first create a calculated column of Strike - 5%. Once the column is created it can be used for filtering or sorting. Is it possible to make calculated columns? I guess this also requires the ability to programmatically refer to existing options positions, so is that possible as well?

Yes, you can create custom columns that run scripts. You can do this without a column though, if you want.

The one thing missing to make this really convenient is TOS's "Scan in" can't be set to the Current Account Positions watchlist. You can maintain your own watchlist that has your open symbols and set "Scan in" to that. You'll want the GetStrike() function. You can pass the underlying symbol to close() to get its current price and then calculate the difference. Load that scan query in a watchlist and then set an alert on it.

A custom column would be the same code but you can also add colors to draw your attention. I created a similar column to get my attention when earnings is coming up on a stock I'm swinging.
 

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