OPEN-SOURCE SCRIPT
Hedge Pressure Index (HPI)

Hedge Pressure Index (HPI)
Overview
The Hedge Pressure Index (HPI) is a flow-aware indicator that fuses daily options Open Interest (OI) with intraday put/call volume to estimate the directional hedging pressure of market makers and dealers. It helps traders visualize whether options flow is creating mechanical buy/sell pressure in IWM, and when that pressure may be shifting.
What HPI Shows
Daily OI Baseline (white line): Net OI carried forward intraday (Put OI − λ × Call OI). Updated once daily before the open.
Intraday Flow (teal line): Net put minus λ × call volume in real time. Smoothed to show underlying flow.
Spread Histogram (gray): Divergence between intraday flow and daily OI.
HPI Proxy Histogram (blue): Intraday hedge-pressure intensity. Strong extremes indicate heavy one-sided dealer hedging.
Trading Signals
Crossover:
When intraday Volume line crosses above OI, it suggests bullish hedge pressure.
When Volume line crosses below OI, it suggests bearish hedge pressure.
Z-Score Extremes:
HPI ≥ +1.5 → strong mechanical bid.
HPI ≤ −1.5 → strong mechanical offer.
Alerts: Built in for both crossovers and extreme readings.
How to Use HPI
1. Confirmation Tool (recommended for most traders):
Trade your usual price/technical setups.
Use HPI as a confirmation: only take trades that align with the hedge pressure direction.
2. Flow Bias (advanced):
Use HPI direction intraday as a standalone bias.
Fade signals when the histogram mean-reverts or crosses zero.
Best practice: Focus on the open and first 2 hours where hedging flows are most active. Combine with ATR/time-based stops.
Inputs
Demo Mode: If no OI/volume feed is set, the script uses chart volume for layout.
λ (Call Weight): Adjusts how much call volume offsets put volume (default = 1.0).
Smoothing Length: Smooths intraday flow line.
Z-Score Lookback: Sets lookback window for HPI extremes.
Custom Symbols:
Daily Net OI (pre-open OI difference).
Intraday Put Volume.
Intraday Call Volume.
Setup Instructions
Add the indicator to an IWM chart.
In Inputs, either keep Demo Mode ON (for layout) or enter your vendor’s Daily Net OI / Put Volume / Call Volume symbols.
Set alerts for crossovers and strong HPI readings to catch flow shifts in real time.
Optionally tune λ and smoothing to match your feed’s scale.
Notes
This is a proxy for dealer hedge pressure. For highest accuracy, replace the proxy histogram with gamma-weighted flow by strike/DTE when your data feed supports it.
Demo mode is for visualization only; live use requires a valid OI and volume feed.
Disclaimer
This script is for educational and research purposes only. It is not financial advice. Options and derivatives carry significant risk. Always test in a demo environment before using live capital.
Overview
The Hedge Pressure Index (HPI) is a flow-aware indicator that fuses daily options Open Interest (OI) with intraday put/call volume to estimate the directional hedging pressure of market makers and dealers. It helps traders visualize whether options flow is creating mechanical buy/sell pressure in IWM, and when that pressure may be shifting.
What HPI Shows
Daily OI Baseline (white line): Net OI carried forward intraday (Put OI − λ × Call OI). Updated once daily before the open.
Intraday Flow (teal line): Net put minus λ × call volume in real time. Smoothed to show underlying flow.
Spread Histogram (gray): Divergence between intraday flow and daily OI.
HPI Proxy Histogram (blue): Intraday hedge-pressure intensity. Strong extremes indicate heavy one-sided dealer hedging.
Trading Signals
Crossover:
When intraday Volume line crosses above OI, it suggests bullish hedge pressure.
When Volume line crosses below OI, it suggests bearish hedge pressure.
Z-Score Extremes:
HPI ≥ +1.5 → strong mechanical bid.
HPI ≤ −1.5 → strong mechanical offer.
Alerts: Built in for both crossovers and extreme readings.
How to Use HPI
1. Confirmation Tool (recommended for most traders):
Trade your usual price/technical setups.
Use HPI as a confirmation: only take trades that align with the hedge pressure direction.
2. Flow Bias (advanced):
Use HPI direction intraday as a standalone bias.
Fade signals when the histogram mean-reverts or crosses zero.
Best practice: Focus on the open and first 2 hours where hedging flows are most active. Combine with ATR/time-based stops.
Inputs
Demo Mode: If no OI/volume feed is set, the script uses chart volume for layout.
λ (Call Weight): Adjusts how much call volume offsets put volume (default = 1.0).
Smoothing Length: Smooths intraday flow line.
Z-Score Lookback: Sets lookback window for HPI extremes.
Custom Symbols:
Daily Net OI (pre-open OI difference).
Intraday Put Volume.
Intraday Call Volume.
Setup Instructions
Add the indicator to an IWM chart.
In Inputs, either keep Demo Mode ON (for layout) or enter your vendor’s Daily Net OI / Put Volume / Call Volume symbols.
Set alerts for crossovers and strong HPI readings to catch flow shifts in real time.
Optionally tune λ and smoothing to match your feed’s scale.
Notes
This is a proxy for dealer hedge pressure. For highest accuracy, replace the proxy histogram with gamma-weighted flow by strike/DTE when your data feed supports it.
Demo mode is for visualization only; live use requires a valid OI and volume feed.
Disclaimer
This script is for educational and research purposes only. It is not financial advice. Options and derivatives carry significant risk. Always test in a demo environment before using live capital.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.