PROTECTED SOURCE SCRIPT
Telah dikemas kini OI Bubbles aggr

This indicator visually represents the positioning of market participants using open interest (OI) data of Bitcoin futures obtained from multiple exchanges.
The main features and functions of the indicator are as follows:
1. Aggregation of OI data from multiple exchanges
- Retrieves and sums OI data from 5 symbols: Binance (BTCUSDTPERP, BTCPERP), Kraken (BTCUSDTPERP), and BitMEX (XBTUSD, XBTUSDT)
2. Calculation of Z-score for OI
- Calculates the Z-score for the total OI
- Uses a moving average (default period is 21) specified for the Z-score calculation
- The Z-score expresses how much the OI value deviates from the average in units of standard deviation
3. Display of signals based on Z-score
- Displays signals when the Z-score exceeds/falls below multiple predefined thresholds (default is 5 levels: 2, 2.5, 3, 4, 5)
- Signals are displayed as colored circles in the middle of the corresponding candle
- The size of the circle increases as the threshold is significantly exceeded, visually emphasizing the magnitude of the position bias
4. Customizable parameters
- Selection of exchanges and symbols to use
- Setting of the type and period of moving average used for Z-score calculation
- Setting of Z-score thresholds
- Setting of signal colors
Extreme position biases may lead to subsequent price movements, making them a key signal for trading.
However, this indicator is based solely on OI data and does not consider other market data such as price action or trading volume.
Therefore, it is crucial to combine the signals obtained from this indicator with other analytical methods for a comprehensive assessment.
Furthermore, the results can be greatly influenced by the parameter settings of the indicator, such as the Z-score thresholds and calculation periods. As a result, it is necessary to conduct thorough backtesting on historical data to find the optimal settings.
The main features and functions of the indicator are as follows:
1. Aggregation of OI data from multiple exchanges
- Retrieves and sums OI data from 5 symbols: Binance (BTCUSDTPERP, BTCPERP), Kraken (BTCUSDTPERP), and BitMEX (XBTUSD, XBTUSDT)
2. Calculation of Z-score for OI
- Calculates the Z-score for the total OI
- Uses a moving average (default period is 21) specified for the Z-score calculation
- The Z-score expresses how much the OI value deviates from the average in units of standard deviation
3. Display of signals based on Z-score
- Displays signals when the Z-score exceeds/falls below multiple predefined thresholds (default is 5 levels: 2, 2.5, 3, 4, 5)
- Signals are displayed as colored circles in the middle of the corresponding candle
- The size of the circle increases as the threshold is significantly exceeded, visually emphasizing the magnitude of the position bias
4. Customizable parameters
- Selection of exchanges and symbols to use
- Setting of the type and period of moving average used for Z-score calculation
- Setting of Z-score thresholds
- Setting of signal colors
Extreme position biases may lead to subsequent price movements, making them a key signal for trading.
However, this indicator is based solely on OI data and does not consider other market data such as price action or trading volume.
Therefore, it is crucial to combine the signals obtained from this indicator with other analytical methods for a comprehensive assessment.
Furthermore, the results can be greatly influenced by the parameter settings of the indicator, such as the Z-score thresholds and calculation periods. As a result, it is necessary to conduct thorough backtesting on historical data to find the optimal settings.
Nota Keluaran
made some changes to the settings screenNota Keluaran
In the original code, the open interest (OI) of BTCPERP was not properly scaled compared to the OI of other symbols. This ensures that the BTCPERP OI is appropriately scaled and contributes to the total open interest calculation in a manner consistent with the other symbols.Nota Keluaran
-oi bubbles removed.A check box has been installed for each deviation.Fixed so that the transparency of the circle can be changed.I made the recommended settings.Nota Keluaran
Add Open Interest Spike to std4.5.Add ETH OI Bubbles.
Nota Keluaran
possible to change the color of circles.Nota Keluaran
updateNota Keluaran
1. Multi-Exchange Aggregation- Combines OI data from multiple perpetual futures exchanges (Binance, Bybit)
- Uses Rate of Change (ROC%) averaging to normalize different OI scales
2. Z-Score Based Anomaly Detection
- Identifies statistically significant OI surges and drops
- Configurable thresholds (default: ±3σ for small signals, ±4σ for large signals)
3. Range Period Filter
- Prevents false signals during low-volatility consolidation periods
- Filters based on minimum ROC% threshold and minimum standard deviation
- Reduces noise when market activity is minimal
4. Signal Cooldown System
- Prevents signal clustering by enforcing minimum bar intervals between signals
- Improves chart readability and signal quality
5. Visual Differentiation
- Circle size indicates signal strength (large vs small)
- Color coding: Green/Cyan for OI increase, Red/Orange for OI decrease
- Horizontal lines extend from signal points for price level reference
Use Case:
Identifies potential market turning points or continuation signals based on sudden changes in trader positioning across major derivatives exchanges.
Nota Keluaran
1. Volume FilterFilters out signals that occur without sufficient trading volume. Only triggers signals when the current volume exceeds the Simple Moving Average multiplied by a configurable multiplier (default: 1.5x). This ensures that OI changes are accompanied by actual trading activity, improving signal reliability.
2. Price Divergence Detection
Analyzes the relationship between OI changes and price movements to identify market positioning:
- "L" (Long Accumulation): OI increasing + Price rising → Suggests bullish continuation as longs are being built
- "S" (Short Accumulation): OI increasing + Price falling → Suggests bearish continuation as shorts are being built
- "X" (Liquidation/Unwinding): OI decreasing + Significant price movement → Indicates position liquidations or voluntary closures
3. Funding Rate Integration
Dynamically changes the circle color based on the current funding rate to indicate market sentiment:
- Green: Positive funding rate → Long-dominant market (longs pay shorts)
- Red: Negative funding rate → Short-dominant market (shorts pay longs)
- Original color: Neutral funding rate within the configured threshold
---
Nota Keluaran
Divergence Visualization Using Circle BordersThe indicator uses a dual-circle overlay technique to display divergence information through border colors. When a divergence condition is detected, a larger circle is drawn behind the main signal circle, creating a visible border effect.
Border Color Meanings:
┌────────────┬───────┬─────────────────┬──────────────────────────────────────────────────────────────────────────────────────────┐
│ Border │ Label │ Condition │ Interpretation │
│ Color │ │ │ │
├────────────┼───────┼─────────────────┼──────────────────────────────────────────────────────────────────────────────────────────┤
│ Lime Green │ L │ OI ↑ + Price ↑ │ Long Accumulation - Traders are opening long positions as price rises, suggesting │
│ │ │ │ bullish continuation │
├────────────┼───────┼─────────────────┼──────────────────────────────────────────────────────────────────────────────────────────┤
│ Hot Pink │ S │ OI ↑ + Price ↓ │ Short Accumulation - Traders are opening short positions as price falls, suggesting │
│ │ │ │ bearish continuation │
├────────────┼───────┼─────────────────┼──────────────────────────────────────────────────────────────────────────────────────────┤
│ White │ X │ OI ↓ + Price │ Liquidation/Unwinding - Positions are being closed, either through forced liquidation or │
│ │ │ Move │ voluntary exit │
├────────────┼───────┼─────────────────┼──────────────────────────────────────────────────────────────────────────────────────────┤
│ No Border │ - │ No divergence │ Normal OI spike without significant price-OI relationship │
└────────────┴───────┴─────────────────┴──────────────────────────────────────────────────────────────────────────────────────────┘
Technical Implementation:
- Outer circle (border): Drawn first with larger size
- Inner circle (body): Drawn on top with smaller size
- The size difference between circles creates the border effect
- Border only appears when divergence is detected
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya secara bebas dan tanpa apa-apa had – ketahui lebih di sini.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya secara bebas dan tanpa apa-apa had – ketahui lebih di sini.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.