Dollar Gamma Calculation

samks_30

New member
2019 Donor
Does anyone here have an idea on how the GEX and DIX are calculated on https://squeezemetrics.com/monitor/dix? I try to multiply gamma by OI at every strike for both calls and puts to get an idea on where the market stands. Any help on calculating daily dollar/gamma exposure would be grateful. Thanks!
 
Last edited:
I do, they're on this site. Just search for Nextsignal.

Nextsignal Gamming Gamma code:

Code:
# Buy Signal: Buy when Gamma and price simultaneously decline
# Filters: 1-bar lower OHLC4 and selling pressure (buying into weakness)
# Strike choice: Strike with highest OI (GEX) and near-the-money

def offset = sqrt ((high - low)) * 0.2;
def gamma = gamma();
def gamma1 =  gamma()[1];
def price = close();
def price1 = price[1];
def sellpress = ((high - close) / (high-low)) > 0.6;

plot buyArrow = if price < price1 and gamma < gamma1 and sellpress and OHLC4 < OHLC4[1] then low - offset else 0;
buyArrow.setpaintingstrategy(paintingstrategy.arrow_up);
buyArrow.setdefaultcolor(createcolor(38,115,255));
buyArrow.setlineweight(2);
buyArrow.hidebubble();
buyArrow.hidetitle();

plot buyValue = if price < price1 and gamma < gamma1 and sellpress and OHLC4 < OHLC4[1] then close else double.nan;
buyValue.setpaintingstrategy(paintingstrategy.values_BELOW);
buyValue.setdefaultcolor(color.Yellow);
buyValue.setlineweight(2);
buyValue.hidebubble();
buyValue.hidetitle();
@Iceman1205us do you have Nextsignals lower currency indicator?
 
Now that we are in RTH, I used the following plot statement in the customized options chain for JPM, expiration 27 DEC 19 (18)
The custom column now shows some good data populating with values ranging from 0.01 to 0.07.
We learn something new every day

Code:
plot myData = gamma()*0.5*Sqr(close(getUnderlyingSymbol())/100);
Thinkscript Option Greeks Values Incorrect - Delta(), Gamma(), Rho(), Theta(), Vega() - when I use addlabel to plot option greek values on a chart, I get a much different value than the value of the option greek I see in a column within an option chain.

Not sure why the difference? Do you experience the same?
 
Last edited by a moderator:
I do, they're on this site. Just search for Nextsignal.

Nextsignal Gamming Gamma code:

Code:
# Buy Signal: Buy when Gamma and price simultaneously decline
# Filters: 1-bar lower OHLC4 and selling pressure (buying into weakness)
# Strike choice: Strike with highest OI (GEX) and near-the-money

def offset = sqrt ((high - low)) * 0.2;
def gamma = gamma();
def gamma1 =  gamma()[1];
def price = close();
def price1 = price[1];
def sellpress = ((high - close) / (high-low)) > 0.6;

plot buyArrow = if price < price1 and gamma < gamma1 and sellpress and OHLC4 < OHLC4[1] then low - offset else 0;
buyArrow.setpaintingstrategy(paintingstrategy.arrow_up);
buyArrow.setdefaultcolor(createcolor(38,115,255));
buyArrow.setlineweight(2);
buyArrow.hidebubble();
buyArrow.hidetitle();

plot buyValue = if price < price1 and gamma < gamma1 and sellpress and OHLC4 < OHLC4[1] then close else double.nan;
buyValue.setpaintingstrategy(paintingstrategy.values_BELOW);
buyValue.setdefaultcolor(color.Yellow);
buyValue.setlineweight(2);
buyValue.hidebubble();
buyValue.hidetitle();
@Iceman1205us, Hi bro, thanks for the scripts. May I check if you have the sell conditions?
 
# Magic Options Qoute
def limit = 20000; #The limit for the cell to be colored

def gex = gamma() * 100 * open_interest();
def vex = volume() - open_interest();
def magicresult = gex + vex;
def ret = if magicresult < 0 then 0 else magicresult;

plot magic = Round(ret, 0);

assignbackgroundcolor(if AbsValue(magic) > limit then createcolor(128,255,0) else color.black);

magic.assignvaluecolor(if AbsValue(magic) > limit then color.black else color.current);
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
175 Online
Create Post

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