PROTECTED SOURCE SCRIPT
已更新 Open Interest Surge Overlay

Open Interest Surge Overlay is an indicator designed to detect and highlight abnormal movements in Open Interest (OI). It plots Spike Up and Spike Down arrows directly on the chart whenever a significant increase or decrease in OI occurs.
The script uses aggregated OI data and is fully parameterizable, allowing you to fine-tune sensitivity, thresholds, and calculation settings to match your trading style.
When an OI surge is detected, the indicator automatically displays the corresponding arrow on the price chart, providing clear visual cues for potential reversals, liquidations, aggressive position changes, or institutional activity.
It also includes complete alert conditions for both Spike Up and Spike Down, making it suitable for real-time monitoring or automated webhook workflows.
This tool is ideal for traders who rely on Open Interest behavior to interpret market positioning, liquidity events, and shifts in directional conviction.
The script uses aggregated OI data and is fully parameterizable, allowing you to fine-tune sensitivity, thresholds, and calculation settings to match your trading style.
When an OI surge is detected, the indicator automatically displays the corresponding arrow on the price chart, providing clear visual cues for potential reversals, liquidations, aggressive position changes, or institutional activity.
It also includes complete alert conditions for both Spike Up and Spike Down, making it suitable for real-time monitoring or automated webhook workflows.
This tool is ideal for traders who rely on Open Interest behavior to interpret market positioning, liquidity events, and shifts in directional conviction.
版本注释
Update Description – Optional Anti-Repaint Mode for OI TriggersThis update introduces a new optional control for signal validation:
useClosedCandleSignals.
This setting allows the user to choose how Open Interest triggers are confirmed — either during the live candle (faster but repaint-prone) or only after the candle has fully closed (slower but fully confirmed).
🔀 How it works
When disabled (default):
Triggers can fire while the candle is still forming.
This provides earlier detection of OI spikes and waves, but signals may appear and disappear intrabar, leading to potential false positives.
When enabled:
All OI triggers (UP, DOWN, and Huge Waves) are only validated if the condition remains true at candle close using barstate.isconfirmed.
This completely removes repainting from the trigger logic, making signals more stable and reliable, though entries will occur later and may miss some of the initial move.
🎯 Affected Components
The following elements now respect the anti-repaint choice:
OI trigger UP
OI trigger DOWN
Huge Wave UP
Huge Wave DOWN
Corresponding shapes and alert conditions
📝 Summary
This change gives the trader full control over the tradeoff between:
Speed and responsiveness (open-candle signals)
Stability and confirmation (closed-candle signals)
allowing the script to be adapted to different trading styles—scalp, day trade, or swing.
Disclaimer:
This indicator is provided for educational purposes only and should not be considered financial advice or an investment recommendation. Trading involves risk, and users are responsible for their own decisions.
版本注释
.受保护脚本
此脚本以闭源形式发布。 但是,您可以自由使用,没有任何限制 — 了解更多信息这里。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
受保护脚本
此脚本以闭源形式发布。 但是,您可以自由使用,没有任何限制 — 了解更多信息这里。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。