OPEN-SOURCE SCRIPT

Open Interest Overlay

1 356
Open Interest Overlay

Overview

This indicator displays Open Interest (OI) data directly on your price chart as an overlay, eliminating the need for separate panes while preserving authentic OI movement patterns. Perfect for traders who want to analyze OI correlations without sacrificing chart real estate.

Key Features

📊 Smart Price Scaling
• Automatically maps Open Interest values to fit within your chart's price range
• Preserves all directional movements, timing, and relative magnitude relationships
• Uses official TradingView Open Interest feed for accuracy

🎨 Full Customization
• Custom Colors: Choose your own colors for rising/falling OI (defaults: teal/red)
• Line Style: Toggle between step-line (traditional) or smooth line display
• Optional Fill: Shade area between OI line and mid-price for better visual reference
• Smoothing Options: Apply moving average smoothing to reduce noise

⚙️ Intelligent Settings
• Normalization Window: 300-bar lookback (customizable) for scaling calculations
• Auto Timeframe: Uses daily data for intraday charts on traditional assets, chart timeframe for crypto
• Real Value Display: Shows actual (unscaled) OI value on the last bar

How It Works

The indicator performs proportional mapping of Open Interest data:
1. Calculates OI range (high/low) over the lookback period
2. Maps this range to your chart's price range during the same period
3. Displays OI movements that maintain authentic patterns and timing

Perfect For
âś… Correlation Analysis - See how OI moves with price in real-time
âś… Divergence Spotting - Identify when OI and price trends diverge
âś… Clean Charts - No need for separate panes or window splitting
âś… Pattern Recognition - Spot OI building/declining during key price levels
âś… Cross-Market Analysis - View any symbol's OI overlay on your current chart (e.g., Bitcoin OI while viewing Ethereum prices)

What You Get vs Traditional OI Indicators

Advantages:
• Authentic OI movement patterns preserved
• Direct visual correlation with price action
• No chart real estate sacrifice
• Immediate trend and divergence recognition

Trade-offs:
• Shows relative OI changes rather than absolute values
• Scaling is relative to the selected lookback period

Ideal For
• Day traders monitoring intraday OI flow
• Swing traders analyzing OI trends with price movements
• Futures traders tracking institutional interest
• Anyone wanting clean, correlation-focused OI analysis

Compatible With
• Futures contracts with Open Interest data
• Any timeframe (auto-adjusts for optimal data)
• All TradingView-supported OI symbols



Declinazione di responsabilitĂ 

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.