Option Chain Analysis Simplified Using Dhan_TradeHull

Traders love insights, and one of the best places to find those insights is inside a well-structured Option Chain. Whether someone is tracking PCR, selecting strikes, analysing OI shifts, or studying Greeks, the option chain plays a major role in faster decision-making.

With the Dhan_TradeHull codebase, these insights become even more accessible. The data is clean, fast, and ready to use directly in your strategies. There’s no need for manual calculations or data cleanup. Everything comes in an easy, plug-and-play format that lets traders focus purely on interpretation.

To demonstrate how effortless it is, here are a few examples using Dhan_TradeHull’s get_option_chain and historical data functions.

  1. Fetching the ATM Option Chain (10 strikes)
atm, option_chain = tsl.get_option_chain(Underlying="NIFTY",exchange="INDEX",expiry=1,num_strikes=10)

With a single call, you instantly get the complete CE and PE ladder with LTP, OI, volumes, Greeks, IV values and more.

  1. Put–Call Ratio (PCR)

PCR remains one of the most popular market sentiment indicators among traders.

pcr = option_chain['PE OI'].sum() / option_chain['CE OI'].sum()

A higher PCR typically suggests a bullish bias, while a lower PCR reflects a bearish leaning.

  1. Volume PCR (VPCR)

Volume PCR shows real-time trader activity by comparing buying volume on Puts versus Calls.

vpcr = option_chain['PE Volume'].sum() / option_chain['CE Volume'].sum()

This becomes especially useful during fast intraday trend shifts and momentum breakouts.

  1. Strike Selection Based on LTP Threshold

Scalpers often prefer options below a specific premium range. Here is a quick filter to find the nearest CE strike priced under ₹10.

required_strike = option_chain.loc[
    option_chain['CE LTP'] < 10, 'Strike Price'
].iloc[0]
  1. Strike Selection Using Delta

Directional traders who use Greeks to identify probability-based strikes can simply pick strikes below a Delta value.

required_strike = option_chain.loc[
    option_chain['CE Delta'] < 0.3, 'Strike Price'
].iloc[0]

A Delta below 0.30 usually indicates a deep OTM option that reacts slower to underlying price movement.

  1. OI Analysis: Long Buildup, Short Buildup, Short Covering, Long Unwinding

Using historical candle data, you can easily classify OI behaviour to understand where positions are being created or exited.

df = tsl.get_historical_data(
    tradingsymbol='NIFTY 09 DEC 26200 CALL',
    exchange='NFO',
    timeframe="5"
)

df['oi_change']    = df['open_interest'].diff()
df['price_change'] = df['close'].diff()
df['oi_analysis']  = None

df.loc[(df['oi_change'] > 0) & (df['price_change'] > 0), 'oi_analysis'] = "long_buildup"
df.loc[(df['oi_change'] > 0) & (df['price_change'] < 0), 'oi_analysis'] = "short_buildup"
df.loc[(df['oi_change'] < 0) & (df['price_change'] > 0), 'oi_analysis'] = "short_covering"
df.loc[(df['oi_change'] < 0) & (df['price_change'] < 0), 'oi_analysis'] = "long_unwinding"

This instantly reveals how price and OI interact, offering valuable insight for both intraday and positional traders.