OPEN-SOURCE SCRIPT
Cập nhật Option Scenario Grid v2 (Time Target)

Overview
Option Scenario Grid v2 is an interactive option price simulator built directly onto your underlying asset's chart. Unlike traditional option calculators that only show you prices for "today," this tool is specifically designed for forward-looking scenario planning.It answers the ultimate trader question: “How much will my option (CALL or PUT) be worth if the underlying price hits a specific level at a specific date and time in the future?”
The script is completely self-contained, utilizes a high-precision mathematical approximation of the Black-Scholes model, and is fully optimized for Pine Script v6.
Key Features
Time Target Modeling: Define the exact date and time you expect the price movement to happen. The script automatically calculates the precise theta decay up to that specific point, showing you the option's value with the remaining time-to-expiry.
Visual Scenario Grid: Plots price levels above and below the current market price using a customizable percentage step. Each level displays the theoretical option value at that exact price boundary.
Visual Timelines on Chart: Automatically draws vertical dashed lines for your Target Time (Blue) and Expiration Date (Red) so you can visually track your trade's time horizon.
Current Price Highlight: The 0% move level (current close) is highlighted with a distinct yellow line, showing what the option will be worth at your target time if the asset price remains completely flat.
How It Works
The script calculates the time remaining for the option ($T$) as the difference between the Expiry Date and your Target Time. This value is plugged into the Black-Scholes formula alongside your custom Implied Volatility (IV) and chosen Strike.
The calculation loops through each price level only on the historical last bar, ensuring maximum chart performance without lagging your interface.
Settings & Inputs
Option Type: Toggle between a CALL or PUT option.
IV %: Set the Implied Volatility of the option.
Step %: The percentage interval between each price level on the grid.
Levels Up/Down: Number of grid levels to display above and below the current price (ranges from 1 to 10).
Target Time: The exact date and time you expect the price target to be met.
Expiry: The option's contract expiration date and time.
Strike Price: Needed option Strike Price.
Option Scenario Grid v2 is an interactive option price simulator built directly onto your underlying asset's chart. Unlike traditional option calculators that only show you prices for "today," this tool is specifically designed for forward-looking scenario planning.It answers the ultimate trader question: “How much will my option (CALL or PUT) be worth if the underlying price hits a specific level at a specific date and time in the future?”
The script is completely self-contained, utilizes a high-precision mathematical approximation of the Black-Scholes model, and is fully optimized for Pine Script v6.
Key Features
Time Target Modeling: Define the exact date and time you expect the price movement to happen. The script automatically calculates the precise theta decay up to that specific point, showing you the option's value with the remaining time-to-expiry.
Visual Scenario Grid: Plots price levels above and below the current market price using a customizable percentage step. Each level displays the theoretical option value at that exact price boundary.
Visual Timelines on Chart: Automatically draws vertical dashed lines for your Target Time (Blue) and Expiration Date (Red) so you can visually track your trade's time horizon.
Current Price Highlight: The 0% move level (current close) is highlighted with a distinct yellow line, showing what the option will be worth at your target time if the asset price remains completely flat.
How It Works
The script calculates the time remaining for the option ($T$) as the difference between the Expiry Date and your Target Time. This value is plugged into the Black-Scholes formula alongside your custom Implied Volatility (IV) and chosen Strike.
The calculation loops through each price level only on the historical last bar, ensuring maximum chart performance without lagging your interface.
Settings & Inputs
Option Type: Toggle between a CALL or PUT option.
IV %: Set the Implied Volatility of the option.
Step %: The percentage interval between each price level on the grid.
Levels Up/Down: Number of grid levels to display above and below the current price (ranges from 1 to 10).
Target Time: The exact date and time you expect the price target to be met.
Expiry: The option's contract expiration date and time.
Strike Price: Needed option Strike Price.
Phát hành các Ghi chú
Small decorative interface changesPhát hành các Ghi chú
Now Price on Current price level always shows for current time, not Target Time.This makes set IV easier to make price compare with current price on the exchange.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.