Increasing Open Interest


Category:
0
0

Hello Mr. Hahn

I’m a big fan of your work. Your condition wizard video has helped me tons as I am now able to see when a particular study might get triggered using the marketwatch/alerts study chart. Thank you.

I have been trying to figure out a way where I can see increasing options open interest by a percentage from one date to another. For example, I would try to find tickers whose open interest increased by 50% from last week to this week. Is there anyway this is possible? I’ve been trying with the condition wizard and some of the premade studies but no luck. Thank you for your time as usual!

Marked as spam
Posted by (Questions: 2, Answers: 1)
Asked on February 22, 2021 10:13 pm
782 views
0
Private answer

Open interest is a built-in fundamental:

https://tlc.thinkorswim.com/center/reference/thinkScript/Functions/Fundamentals/open-interest

In the link above we have an example of how to use that in a chart study.

If we want to construct a filter for a scan that finds options where the open interest has increased 50% over the same value from 5 days ago we can write that filter like this:

plot scan = open_interest() > open_interest()[5] * 1.5;

This will only work for ticker symbols of Futures contracts and Options contracts. This does not work for individual stocks because Thinkorswim does not display total options open interest for individual stocks.

 

Marked as spam
Posted by (Questions: 37, Answers: 4084)
Answered on February 23, 2021 8:40 am
0
Thank you very much! Exactly what I wanted.
( at February 23, 2021 9:11 am)
0
This samplle of my code might help... Fundamental("fundamentalType" = FundamentalType.OPEN_INTEREST, "period" = AggregationPeriod.DAY) from 3 bars ago is greater than or equal to Fundamental("fundamentalType" = FundamentalType.OPEN_INTEREST, "period" = AggregationPeriod.DAY) from 4 bars ago
( at November 30, 2021 10:42 am)
0
Thanks for providing a potential solution. However the code you posted includes a reference to a secondary aggregation period, which is not permitted for scans on the current version of Thinkorswim. But there is a bigger problem to address. Which is that Study Filters can only read data from individual stocks. Even when we apply a Study Filter to the "Options Hacker" scan on Thinkorswim, the code we add to that Study Filter does not see any options contracts at all. Only individual stocks.
( at November 30, 2021 2:21 pm)