

Price vs Open Interest
Introduction
The "Price vs Open Interest" indicator is a powerful visualization tool for TradingView, designed to analyze the relationship between price movements and open interest (OI) changes in cryptocurrency markets. It displays a quadrant-based matrix that plots the rate of change (ROC) of price against OI, helping traders identify market conditions such as leveraged rallies, spot-driven trends, or potential short squeezes. This indicator is particularly valuable for traders seeking to understand market sentiment and anticipate volatility shifts.
Key Features
-
Quadrant matrix plotting price ROC versus OI ROC for clear market insights.
-
Historical trail showing recent price-OI dynamics with customizable length.
-
Flexible box and trail settings for tailored chart placement and appearance.
-
Informative quadrant labels describing market scenarios like deleveraging sell-offs.
-
Adaptive theme detection for optimal contrast in light or dark chart modes.
​
How it Works
The indicator processes price and open interest data to create an intuitive visual representation:
-
Data Retrieval: Fetches open interest for the current symbol, supporting perpetual futures contracts by appending appropriate suffixes (e.g., ".P_OI" for USDT pairs).
-
ROC Calculation: Computes the 1-period percentage change for price and OI, normalized for comparison, with a user-adjustable OI ROC lookback (default: 7).
-
Historical Trail: Tracks up to 5 previous price-OI points, linked by lines with optional gradient colors and fading effects, enhancing trend visibility.
-
Visual Elements: Includes crosshairs, diagonal lines, and quadrant labels (e.g., "SPOT RALLY" or "POTENTIAL SHORT SQUEEZE") with customizable text size and opacity.
Quadrants:
​Quadrant Matrix: Renders a box divided into four quadrants, with the x-axis for OI ROC and y-axis for price ROC. A colored dot marks the current price-OI relationship:
-
Top Right (Price Up, OI Up): Leveraged rally, glow-colored.
-
Top Left (Price Up, OI Down): Spot rally, highlight-colored.
-
Bottom Right (Price Down, OI Up): Leveraged sell-off, highlight-colored.
-
Bottom Left (Price Down, OI Down): Deleveraging sell-off, accent-colored.
Conclusion​
The "Price vs Open Interest" indicator provides traders with a clear, actionable view of market dynamics by mapping price and open interest changes. Its quadrant matrix simplifies the interpretation of complex trends, making it easier to spot opportunities or risks like liquidation cascades. With robust customization and adaptive visuals, this tool supports strategic trading decisions across various crypto market conditions.
​
Disclaimer
This indicator is provided for informational and educational purposes only and does not constitute financial advice. Trading involves significant risk, and users should conduct their own research and analysis before making any trading decisions. The creator of this indicator is not responsible for any financial losses or gains resulting from its use.