PROTECTED SOURCE SCRIPT
Simulated OI Proxy with Trend Table

1. In Simple Terms
This script mimics open interest analysis using price and volume changes.
It visually marks possible bullish and bearish setups directly on your price chart.
It’s especially useful for markets where real OI data is not available (like Indian stocks)
=======================================================================
2. Calculating Price and Volume Changes
close - close: Calculates the change in closing price from the previous bar to the current bar.
volume - volume: Calculates the change in trading volume from the previous bar to the current bar.
Purpose:
These calculations help determine if price and volume are increasing or decreasing, which is used as a proxy for open interest (OI) since real OI data may not be available.
===================================================================
3. Proxy Logic for OI Signals
long_buildup: Both price and volume are rising. This suggests new buying interest (bullish signal).
short_buildup: Price is falling but volume is rising. This suggests new short positions are being opened (bearish signal).
short_covering: Price is rising but volume is falling. This suggests shorts are closing their positions, causing a price rise (cautiously bullish).
long_unwinding: Both price and volume are falling. This suggests long positions are being closed (cautiously bearish).
====================================================================
4. Plotting the Signals
plotshape(condition, ...): Draws a shape on the chart when the condition is true.
Long Buildup: Green triangle below the bar (bullish).
Short Buildup: Red triangle above the bar (bearish).
Short Covering: Blue circle below the bar (cautiously bullish).
Long Unwinding: Orange circle above the bar (cautiously bearish).
======================================================================
5. Signal Detection:
The script checks price and volume changes to determine which signal is active.
Trend Assignment:
It assigns a text label and color for the detected trend.
Table Display:
A table appears at the top-right of your chart, showing the current trend based on the latest bar.
This script mimics open interest analysis using price and volume changes.
It visually marks possible bullish and bearish setups directly on your price chart.
It’s especially useful for markets where real OI data is not available (like Indian stocks)
=======================================================================
2. Calculating Price and Volume Changes
close - close: Calculates the change in closing price from the previous bar to the current bar.
volume - volume: Calculates the change in trading volume from the previous bar to the current bar.
Purpose:
These calculations help determine if price and volume are increasing or decreasing, which is used as a proxy for open interest (OI) since real OI data may not be available.
===================================================================
3. Proxy Logic for OI Signals
long_buildup: Both price and volume are rising. This suggests new buying interest (bullish signal).
short_buildup: Price is falling but volume is rising. This suggests new short positions are being opened (bearish signal).
short_covering: Price is rising but volume is falling. This suggests shorts are closing their positions, causing a price rise (cautiously bullish).
long_unwinding: Both price and volume are falling. This suggests long positions are being closed (cautiously bearish).
====================================================================
4. Plotting the Signals
plotshape(condition, ...): Draws a shape on the chart when the condition is true.
Long Buildup: Green triangle below the bar (bullish).
Short Buildup: Red triangle above the bar (bearish).
Short Covering: Blue circle below the bar (cautiously bullish).
Long Unwinding: Orange circle above the bar (cautiously bearish).
======================================================================
5. Signal Detection:
The script checks price and volume changes to determine which signal is active.
Trend Assignment:
It assigns a text label and color for the detected trend.
Table Display:
A table appears at the top-right of your chart, showing the current trend based on the latest bar.
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。