[DSP] Perp Leverage Hunter: OI Squeeze EngineDSP Perp Leverage Hunter: Open Interest Squeeze & Flush Engine
The DSP Perp Leverage Hunter is a professional-grade analysis tool designed specifically for the high-volatility environment of Crypto Perpetual Futures. Unlike traditional oscillators that rely solely on price and volume, this indicator deciphers the hidden mechanics of market positioning by analyzing Open Interest (OI) flow in real-time.
By identifying the precise moments when leverage becomes overextended, the Leverage Hunter allows traders to anticipate short squeezes and long flushes before they materialize on the price chart.
Core Architectural Features:
Institutional OIROC Momentum: Uses Open Interest Rate of Change (OIROC) as the primary momentum engine. This filters out the "noise" of volume and focuses strictly on the expansion and contraction of leveraged positions.
Adaptive DSP Synchronization: Featuring a cross-script bridge, this indicator can dynamically synchronize its lookback period with an external dominant market cycle (e.g., from the DSP Cycle Forecaster). This ensures the indicator scales perfectly with shifting market regimes.
Percentile-Rank OI Index: Replaces traditional Min-Max normalization with a rolling Percentile Rank. This provides a stable 0-100 gauge of "Leverage Saturation" that is immune to outlier spikes and division-by-zero errors.
Zero-Lag SuperSmoother: Employs Ehlers’ Zero-Lag SuperSmoother for signal normalization, providing institutional-grade responsiveness without the erratic "jaggedness" of standard moving averages.
Squeeze/Flush Divergence Tracking: The momentum line dynamically color-codes based on the correlation between Price and Open Interest.
Purple (Confirmation): Price and OI are trending in sync.
Orange (Divergence): Price is moving against the OI flow—the signature of a high-probability squeeze or flush.
Actionable Signal Intelligence:
Danger Zones (Background Flashes): Highlights "Overheated" leverage states where a violent reversal is statistically imminent.
Unwind Triggers (The "Pop"): Precise diamond markers fire the moment leveraged pressure begins to release. This serves as a high-fidelity execution signal for taking profits or entering mean-reversion trades.
Smart OI Fetching: Integrated security fetching specifically targets the _OI tickers (e.g., BTCUSDT.P_OI), ensuring you are always looking at the most relevant perpetual data.
How to Use:
Linkage: For maximum accuracy, add a Cycle Forecaster to your chart and link the External Period Source to its dominant period output.
Squeeze Detection: Look for a Red Background (High OI + High Momentum) combined with an Orange momentum line. This signals a "Squeeze Setup."
The Trigger: Wait for the POP Diamond to appear on the momentum line, signaling that the pressure has peaked and the unwind has begun.
Note: This indicator is designed strictly for assets with Open Interest data (Crypto Perpetuals).
Pine Script® 인디케이터






















