OPEN-SOURCE SCRIPT
已更新

Option Scenario Grid v2 (Time Target)

386
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.
版本注释
Small decorative interface changes
版本注释
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.

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。