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

rad14733

Well-known member
VIP
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

Luv2H8ToSH82Luv

New member
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?
 

Slippage

Active member
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.
 

Similar threads

Top