♥ 1 |
Playing with an Options Volume script. Needed some help with directly getting the Option series data from a Symbol instead of inputting the data separately. This will make life much more easier since one can just select and paste the specific option symbol and the script can pick up the rest. Following is the link to the thinkscript. https://usethinkscript.com/threads/option-volume-open-interest-indicator-for-thinkorswim.313/ .SPY200207P323 declare lower;
Marked as spam
|
Private answer
There are no tools in the Thinkorswim language to parse strings. So it is not possible to take an OPRA code as an input and parse that string out into it's individual components. There are two functions that can assist us. But not for this particular solution. GetStrike(): https://toslc.thinkorswim.com/center/reference/thinkScript/Functions/Option-Related/GetStrike IsPut(): https://toslc.thinkorswim.com/center/reference/thinkScript/Functions/Option-Related/IsPut Each of these functions will only work for the ticker symbol loaded on the chart. So if your chart is displaying the underlying, say AAPL then neither of these functions will be useful. Those functions are only useful if your chart were set to an option string, such as .AAPL200228C305. You can also use those two functions in a custom watchlist column. If it were possible to parse strings in Thinkorswim, I am certain the author of that code you referenced would have already included such functionality in the tool they built. Marked as spam
|
|||||
Private answer
The degree of complexity in solving this is WAY beyond the scope of anything I provide for no charge in the Q&A forum. There is over 200 lines of code in that chart study. Marked as spam
|
Please log in to post questions.