Unusual Options Metric (Option Chain Column) For ThinkOrSwim

I’ll post the link when I can. They’re all from this forum though search these if you so choose
1. Percent Change Last
2. Change Open Interest (%)
3. Volume 2x Open interest
4. MAMA (in the confirmation trend chart setup thread)
5. How Much To Move

@HODL-Lay-HE-hoo! Thanks for linking the V2xOI and where to find the MAMA info. #1 and #2 are pretty self explanatory and I was able to recreate those on my own. Cannot find anything on the "How Much to Move" on here...if you don't have a link to it, can you please give a quick explanation of what it's supposed to indicate so I can try to recreate on my own?
 
@jkinl: I do not know why you are getting this error message. I suggest that you look at the two YouTube videos that I posted on May 17, 2023 in this thread. Sorry that I could not be of more help.
 
@HODL-Lay-HE-hoo! Thanks for linking the V2xOI and where to find the MAMA info. #1 and #2 are pretty self explanatory and I was able to recreate those on my own. Cannot find anything on the "How Much to Move" on here...if you don't have a link to it, can you please give a quick explanation of what it's supposed to indicate so I can try to recreate on my own?
I will find a link it is just spread divided by delta (I think that’s the formula..?) to determine how much the underlying needs to move in order for the option to increase in value. I will post a link soon.

Code:
How Much To Move

def net = ask - bid;
def howmuchneedtomove = net / Delta();
plot data = AbsValue(howmuchneedtomove);
AssignBackgroundColor(if (net < .5) then Color.dark_green
else if (net >.5 ) then Color.Dark_Gray
else Color.dark_GRAY);

data.AssignValueColor( if (net < .5) then Color.White
else if (net >.5) then Color.black
else color.black);
 
Last edited:
Regarding the .TSLA230519P172.5 that I mentioned in post #28 of this thread. It should be noted that just because that PUT had a very high Unusual Options Metric number, one should not assume that all of those puts were on the buy side of the trade. Using my options flow software, I was able to see that there were seven trades yesterday for that strike price. (With a minimum premium of #100k for each trade and an expiration date of 5/19/2023). Two of those PUT trades were on the buy side. And the remaining five from yesterday were on the sell side.
If you can share, which "Option flow software" shows buy/sell side? Thanks!!
 
Nice work good sir... Added some pretty colors and rounded to whole number...
Code:
#Defining variables

def Delta = Delta();

def Ivol = imp_volatility(GetUnderlyingSymbol());

def OptionMarkPrice = close;

def UnderlyingPrice = close(getUnderlyingSymbol());

def UnderlyingVolume = volume(getUnderlyingSymbol());

#V.A.L.R - Volitility Adjusted Leverage Ratio

def Leverage = (Delta * UnderlyingPrice);

def LeverageRatio = Leverage / OptionMarkPrice;

def VALR = LeverageRatio * Ivol;

#Volume to open interest ratio (if statement pervents divide by zero errors)

def OpenInterest = if open_interest(period = AggregationPeriod.DAY) == 0 then 1 else open_interest(period = AggregationPeriod.DAY);

def volOI = volume / OpenInterest;

#Option dollar volume traded

def DvolumeOpt = volume * ohlc4 * 100;

#Underlying dollar volume traded

def DvolumeUnd = UnderlyingPrice * UnderlyingVolume;

def DvolumeRatio = DvolumeOpt / DvolumeUnd;

#Multiply by 1000 so output better displays in the columns

def WhaleScore = round(VALR * volOI * DvolumeRatio * 1000,0);

plot WhalePlot = WhaleScore;
addlabel(yes, whalescore, if (WHALESCORE >=2100) then Color.black
else if WHALESCORE >=1000 and WHALESCORE<2100 then Color.white
else if WHALESCORE <1000 and  WHALESCORE >=100 then Color.white
else if WHALESCORE <100 and  WHALESCORE >=0 then Color.white
else if WHALESCORE <0 and  WHALESCORE >=-100 then Color.white
else if WHALESCORE <-100 and  WHALESCORE >=-1000 then Color.white
else if WHALESCORE <-2100 then Color.black
else Color.dark_GRAY);

AssignBackgroundColor(
if (WHALESCORE >=2100) then Color.cyan
else if WHALESCORE >=1000 and WHALESCORE<2100 then Color.dark_green
else if WHALESCORE <1000 and  WHALESCORE >=100 then Color.gray
else if WHALESCORE <100 and  WHALESCORE >=0 then Color.gray
else if WHALESCORE <0 and  WHALESCORE >=-100 then Color.gray
else if WHALESCORE <-100 and  WHALESCORE >=-1000 then Color.dark_green
else if WHALESCORE <-2100 then Color.cyan
else Color.dark_GRAY);

View attachment 18533
What's the MAFA5? Is that sharable? Thanks!
 
Nice work good sir... Added some pretty colors and rounded to whole number...
Code:
#Defining variables

def Delta = Delta();

def Ivol = imp_volatility(GetUnderlyingSymbol());

def OptionMarkPrice = close;

def UnderlyingPrice = close(getUnderlyingSymbol());

def UnderlyingVolume = volume(getUnderlyingSymbol());

#V.A.L.R - Volitility Adjusted Leverage Ratio

def Leverage = (Delta * UnderlyingPrice);

def LeverageRatio = Leverage / OptionMarkPrice;

def VALR = LeverageRatio * Ivol;

#Volume to open interest ratio (if statement pervents divide by zero errors)

def OpenInterest = if open_interest(period = AggregationPeriod.DAY) == 0 then 1 else open_interest(period = AggregationPeriod.DAY);

def volOI = volume / OpenInterest;

#Option dollar volume traded

def DvolumeOpt = volume * ohlc4 * 100;

#Underlying dollar volume traded

def DvolumeUnd = UnderlyingPrice * UnderlyingVolume;

def DvolumeRatio = DvolumeOpt / DvolumeUnd;

#Multiply by 1000 so output better displays in the columns

def WhaleScore = round(VALR * volOI * DvolumeRatio * 1000,0);

plot WhalePlot = WhaleScore;
addlabel(yes, whalescore, if (WHALESCORE >=2100) then Color.black
else if WHALESCORE >=1000 and WHALESCORE<2100 then Color.white
else if WHALESCORE <1000 and  WHALESCORE >=100 then Color.white
else if WHALESCORE <100 and  WHALESCORE >=0 then Color.white
else if WHALESCORE <0 and  WHALESCORE >=-100 then Color.white
else if WHALESCORE <-100 and  WHALESCORE >=-1000 then Color.white
else if WHALESCORE <-2100 then Color.black
else Color.dark_GRAY);

AssignBackgroundColor(
if (WHALESCORE >=2100) then Color.cyan
else if WHALESCORE >=1000 and WHALESCORE<2100 then Color.dark_green
else if WHALESCORE <1000 and  WHALESCORE >=100 then Color.gray
else if WHALESCORE <100 and  WHALESCORE >=0 then Color.gray
else if WHALESCORE <0 and  WHALESCORE >=-100 then Color.gray
else if WHALESCORE <-100 and  WHALESCORE >=-1000 then Color.dark_green
else if WHALESCORE <-2100 then Color.cyan
else Color.dark_GRAY);

View attachment 18533
For some reason my Vol open interest isn't showing me anything and the "Big 4" isn't giving me the "thumbs" on the red or green's ... did I do something wrong?
 
Last edited by a moderator:
For some reason my Vol open interest isn't showing me anything and the "Big 4" isn't giving me the "thumbs" on the red or green's ... did I do something wrong?
The thumbs up or down represent the BIG4 arrows - the colors represent the big 4 candle color - the "alert4" text is the vix alert - the text and the thumb can also appear together as well. The former big4 WL column did not have the vix alert.
 
The thumbs up or down represent the BIG4 arrows - the colors represent the big 4 candle color - the "alert4" text is the vix alert - the text and the thumb can also appear together as well. The former big4 WL column did not have the vix alert.
Any reason the the open interest 2xvolume is always black? I've looked at SPY/SPX TSLA, NVDA, AMD MSFT and it's always black...
 
Quick question on the Whale Indicator. Is there a way of subtracting the number if the Open Interest drops on the chain? Trying to see if we can get an idea of swings intraday between Calls and Puts. Thanks!
 
I’ll post the link when I can. They’re all from this forum though search these if you so choose
1. Percent Change Last
2. Change Open Interest (%)
3. Volume 2x Open interest
4. MAMA (in the confirmation trend chart setup thread)
5. How Much To Move
I saw the screenshot you posted here (https://usethinkscript.com/attachments/7ubz786-png.18533). I'm having some trouble with my code. For your "Chg_OI" and "Vol 2x OI" columns, what syntax in your script did you use to differentiate color.green and color.dark green based on the outputted values?
 
I’ll post the link when I can. They’re all from this forum though search these if you so choose
1. Percent Change Last
2. Change Open Interest (%)
3. Volume 2x Open interest
4. MAMA (in the confirmation trend chart setup thread)
5. How Much To Move
This is what I found on this forum in regard to Change Open interest (%):

def oi = openinterest();
def chgoi = oi - oi[1];
plot z = chgoi;

May I please have your version of the WL Column? Could you post the code for (1. Percent Change Last) as well? Thank you in advance.
 

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