OPEN-SOURCE SCRIPT

Options Chain Table [Enhanced]

26
The primary purpose of this script is Unusual Options Activity (UOA) Detection.Identifying "Whales": Traders use it to spot when large institutions or "smart money" are aggressively buying Calls (betting price goes up) or Puts (betting price goes down).Contextualizing Volume: Instead of just showing raw volume (e.g., "10,000 contracts traded"), it calculates a Ratio. If the average volume is 1,000 and today's volume is 10,000, that is a 10x Spike, which is highly significant.0DTE & Short-Term Trading: It is optimized for analyzing the "Active Expiration" (often the current day for SPX/NDX), making it useful for 0DTE (Zero Days to Expiration) strategies.2. Key Features & VisualsThe script overlays a table on your chart with the following columns:ColumnDescriptionCall AvgThe historical average volume (Moving Average) for the Call option.Call RatioThe "Spike Factor." calculated as $CURRENT Volume / Average Volume$$. High ratios turn Green.Call VolThe actual volume traded today for that Call strike.StrikeThe Strike Price of the option (e.g., 5800). The "At-The-Money" (ATM) strike is highlighted Blue.Put VolThe actual volume traded today for that Put strike.Put RatioThe "Spike Factor" for Puts. High ratios turn Red/Fuchsia.Put AvgThe historical average volume (Moving Average) for the Put option.3. How It Works (Technical Breakdown)This script uses advanced Pine Script techniques to bypass some of TradingView's limitations regarding options data.A. Dynamic Symbol ConstructionTradingView does not have a simple function to "get the option chain." This script manually constructs the ticker symbol for each option contract using the OPRA format:Format: OPRA:ROOT[Expiration][C/P][Strike]Example: OPRA:SPXW251226C5800 (SPX Weekly, Dec 26, 2025, Call, 5800 Strike).B. Tuple Fetching (Optimization)TradingView limits scripts to 40 request.security calls. To display 11 rows of data (which would normally require 44 calls: Call Vol, Call MA, Put Vol, Put MA per row), the script uses Tuple Fetching. It requests the Volume and the Moving Average in a single request, cutting the data usage in half and allowing the table to load faster without errors.C. Spike LogicIt calculates a moving average (EMA or SMA) of the volume over a set lookback period (default 20 bars).Medium Spike (M): Volume is > 2x the average.Large Spike (L): Volume is > 3.5x the average.Extreme Spike (E): Volume is > 5x the average.4. How to Use It (User Guide)To use this script effectively, you must configure the "Inputs" correctly, as it cannot always guess the correct expiration dates automatically.Add to Chart: Add the script to a chart (works best on indices like SPX, NDX, SPY, QQQ).Set the Center Price (Crucial):In the settings, look for "Manual Center Price".Input the current price of the asset (e.g., if SPX is at 5815, enter 5815).Why? The script generates strikes around this number. If you leave it 0, it might try to use the close price, which can be buggy during pre-market or if data is delayed.Set the Expiration (DTE):The script attempts to default to "Today," but for best results, manually enter the date in YYMMDD format in the "Manual DTE" field.Example: For December 26, 2025, enter 251226.Read the Alerts:The script allows you to set alerts in TradingView."Any Spike → CALL": Tells you a Call option just had a massive volume spike."Any Spike → PUT": Tells you a Put option just had a massive volume spike.5. Strategy ExampleA trader using this script might see the following scenario:Market: SPX is trading sideways at 5800.Signal: The table flashes a bright green cell on the 5850 Call with a ratio of "E 6.2x" (Extreme, 6.2 times normal volume).Interpretation: Someone is aggressively buying out-of-the-money Calls. The trader might interpret this as a bullish signal (Gamma exposure increasing at 5850) and enter a long position, expecting the price to be magnetized toward 5850.

Penafian

Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.