Appearance
Personalize your experience
Mode
Accent Color
Layout
Direction
Options OI Heatmap
Admin's ChoiceFreeOverlay option open interest as horizontal bars on the price axis
4.9(178)
3.2k installs 890 2 commentsQ
42 listings12400 followers
Official QuaTick team — building advanced charting & trading tools for the Indian market.
View Profileoptionsoiheatmapsentiment
Free
Open in QuaTick IDE Edit in IDE Version1.1.0
Updated2025-10-30
Compatiblecandlestick
Rating Distribution
5
1
4
0
3
0
2
0
1
0
Preview
1 / 2
Chart preview
About
Renders call and put open interest at each strike as heatmap bars directly on the chart's price axis.
Features
• Green Call OI bars (right side)
• Red Put OI bars (left side)
• Auto-scales to maxOI
• Visible range filtering for performance
Overlay Details
Render Layer
price
Source Code
Edit in IDEtypescript
| 1 | // OI Heatmap Overlay — Quatick IDE |
| 2 | // Returns a volume-weighted OI proxy series from OHLCV. |
| 3 | // SDK math globals available: sma, ema, atr, rsi, macd, bollingerBands, vwap, etc. |
| 4 | |
| 5 | const metadata = { id: 'oi-heatmap', name: 'OI Heatmap', version: '1.0.0', category: 'overlay' }; |
| 6 | |
| 7 | interface BarData { |
| 8 | time: number; |
| 9 | open: number; |
| 10 | high: number; |
| 11 | low: number; |
| 12 | close: number; |
| 13 | volume?: number; |
| 14 | } |
| 15 | |
| 16 | const defaultParams = { period: 14, smoothing: 5 }; |
| 17 | |
| 18 | /** |
| 19 | * OI Proxy — approximates open interest pressure using volume and price range. |
| 20 | * High positive values indicate accumulation (bullish OI buildup). |
| 21 | * High negative values indicate distribution (bearish OI buildup). |
| 22 | */ |
| 23 | function calculate(bars: BarData[], params = defaultParams): { time: number; value: number }[] { |
| 24 | const closes = bars.map(b => b.close); |
| 25 | const highs = bars.map(b => b.high); |
| 26 | const lows = bars.map(b => b.low); |
| 27 | const volumes = bars.map(b => b.volume ?? 1); |
| 28 | |
| 29 | // Estimate OI change: up-close bars with high volume = OI increase (bullish) |
| 30 | const oiDelta = bars.map(b => { |
| 31 | const direction = b.close >= b.open ? 1 : -1; |
| 32 | const range = b.high - b.low || 1; |
| 33 | const bodyRatio = Math.abs(b.close - b.open) / range; |
| 34 | return direction * bodyRatio * (b.volume ?? 1); |
| 35 | }); |
| 36 | |
| 37 | // Smooth and normalise |
| 38 | const smoothed = sma(oiDelta, params.smoothing); |
| 39 | const maxAbs = Math.max(...smoothed.filter(v => !isNaN(v)).map(v => Math.abs(v)), 1); |
| 40 | |
| 41 | return bars |
| 42 | .map((bar, i) => ({ time: bar.time, value: isNaN(smoothed[i]) ? NaN : smoothed[i] / maxAbs })) |
| 43 | .filter(p => !isNaN(p.value)); |
| 44 | } |
Read-only preview. Open in the QuaTick IDE to edit and deploy.
Reviews
No reviews yet. Be the first to review this listing.
Discussion
Sign in to join the discussion. Your posts and replies show up on your profile.