OPEN-SOURCE SCRIPT
Raja OI Grid Lines

Raja OI Grid Lines is a dynamic Pine Script v6 indicator designed for traders using Spot charts (such as XAUUSD) while tracking Futures or Options Open Interest (OI) levels. It automatically plots horizontal grid lines at precise Spot price levels while labeling them with their corresponding rounded Option Strike Prices based on a customizable daily Basis Offset.
🌟 Key Features
Spot-to-Future Price Alignment: Plots grid lines directly at actual Spot price levels on the chart while displaying the equivalent Futures/Options Strike Price labels (Spot + Basis).
Daily Open Anchor: Uses the Daily Open price as a baseline reference, ensuring grid levels remain stable throughout the trading day without fluctuating with intraday movements.
Automatic Strike Rounding: Automatically rounds target levels to clean, standard Option Strike intervals (e.g., 4000, 4025, 4050, 4075).
Fully Customizable Inputs: Easily update the daily Basis Offset via the settings panel, and adjust line colors, styles, thickness, or the number of displayed grid lines.
💡 How It Works
Example: If Spot XAUUSD is at 4,170 and your Basis Offset is set to 30:
The indicator plots a grid line on the Spot chart at 4,170.
The right-hand label displays 4200 (4,170 + 30).
The next grid line above is drawn at Spot 4,195 with a label showing 4225 (spacing out at standard $25 intervals).
⚙️ Inputs Guide
Basis Offset (USD): The daily difference between Spot and Futures/Options prices to apply.
Grid Step Size (USD): The price interval between Option Strike levels (Default: $25).
Number of Lines (Above/Below): Sets how many grid lines to generate above and below the center anchor (Default: ±20 lines).
Show Strike Price Labels: Toggles the visibility of Futures/Options Strike Price labels on the right edge of the chart.
🌟 Key Features
Spot-to-Future Price Alignment: Plots grid lines directly at actual Spot price levels on the chart while displaying the equivalent Futures/Options Strike Price labels (Spot + Basis).
Daily Open Anchor: Uses the Daily Open price as a baseline reference, ensuring grid levels remain stable throughout the trading day without fluctuating with intraday movements.
Automatic Strike Rounding: Automatically rounds target levels to clean, standard Option Strike intervals (e.g., 4000, 4025, 4050, 4075).
Fully Customizable Inputs: Easily update the daily Basis Offset via the settings panel, and adjust line colors, styles, thickness, or the number of displayed grid lines.
💡 How It Works
Example: If Spot XAUUSD is at 4,170 and your Basis Offset is set to 30:
The indicator plots a grid line on the Spot chart at 4,170.
The right-hand label displays 4200 (4,170 + 30).
The next grid line above is drawn at Spot 4,195 with a label showing 4225 (spacing out at standard $25 intervals).
⚙️ Inputs Guide
Basis Offset (USD): The daily difference between Spot and Futures/Options prices to apply.
Grid Step Size (USD): The price interval between Option Strike levels (Default: $25).
Number of Lines (Above/Below): Sets how many grid lines to generate above and below the center anchor (Default: ±20 lines).
Show Strike Price Labels: Toggles the visibility of Futures/Options Strike Price labels on the right edge of the chart.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.