//@version=6
// =============================================================================
// TR IV Surface — VIOP option implied-vol surface snapshot table on chart.
// Shows the ATM term structure, 25-delta skew (front month), and the front /
// back vol slope. Static snapshot — refresh via the MCP to update.
//
// Placeholders filled by the MCP at generation time:
// {{UNDERLYING}} — VIOP underlying, e.g. "XU030"
// {{SPOT}} — spot price at snapshot time
// {{ATM_TERM_JSON}} — JSON array of {expiry, dte, atm_iv_pct}
// {{SKEW_25D_PUT_PCT}} — 25-delta put IV %
// {{SKEW_25D_CALL_PCT}} — 25-delta call IV %
// {{SKEW_VOL_PTS}} — put_iv - call_iv (vol points)
// {{TERM_SLOPE_VOL_PTS}} — front ATM - back ATM (vol points)
// {{AS_OF_DATE}} — YYYY-MM-DD snapshot
// =============================================================================
indicator("TR IV Surface — {{UNDERLYING}} ({{AS_OF_DATE}})", overlay = true)
spotPx = {{SPOT}}
put25Pct = {{SKEW_25D_PUT_PCT}}
call25Pct = {{SKEW_25D_CALL_PCT}}
skewVolPts = {{SKEW_VOL_PTS}}
termSlopePts = {{TERM_SLOPE_VOL_PTS}}
// --- ATM term structure rows ------------------------------------------------
var string[] expiries = array.new<string>(0)
var float[] dtes = array.new<float>(0)
var float[] atmIvs = array.new<float>(0)
if barstate.isfirst
{{ATM_TERM_LOADER}}
// --- Snapshot table ---------------------------------------------------------
var table iv = table.new(position.top_right, 3, 12, frame_color = color.gray,
border_color = color.gray)
if barstate.islast
table.cell(iv, 0, 0, "Expiry", bgcolor = color.new(color.gray, 60),
text_color = color.white)
table.cell(iv, 1, 0, "DTE", bgcolor = color.new(color.gray, 60),
text_color = color.white)
table.cell(iv, 2, 0, "ATM IV%", bgcolor = color.new(color.gray, 60),
text_color = color.white)
n = math.min(array.size(expiries), 10)
for i = 0 to n - 1
table.cell(iv, 0, i + 1, array.get(expiries, i))
table.cell(iv, 1, i + 1, str.tostring(array.get(dtes, i), "#"))
table.cell(iv, 2, i + 1, str.tostring(array.get(atmIvs, i), "#.##"))
rowSkew = n + 1
table.cell(iv, 0, rowSkew, "25Δ Skew", bgcolor = color.new(color.orange, 60),
text_color = color.white)
table.cell(iv, 1, rowSkew, str.tostring(skewVolPts, "+#.##;-#.##"))
table.cell(iv, 2, rowSkew, "vol pts")
rowTerm = rowSkew + 1
table.cell(iv, 0, rowTerm, "Term Slope", bgcolor = color.new(color.orange, 60),
text_color = color.white)
table.cell(iv, 1, rowTerm, str.tostring(termSlopePts, "+#.##;-#.##"))
table.cell(iv, 2, rowTerm, "front-back")
Overview
TR IV Surface displays the ATM term structure with expiry, DTE, and ATM IV percent rows, plus 25-delta skew and term slope in vol points. The table updates statically on the last bar using MCP-filled placeholders for spot price, skew, and term data. No entry or exit signals exist as it is not a strategy. It applies to BIST indices and VIOP contracts with no user settings. The snapshot refreshes via the MCP server only and draws solely in the top-right chart position.
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
This overlay indicator marks ICT liquidity void fills on the price chart and can show long and short signals. It places a Fibonacci level inside a displacement candle, defaulting to the midpoint, and draws lines in a chosen style. Optional filters limit the fi
This indicator plots Donchian Channel boundary lines along with dynamic fan projections directly on the price chart. It calculates the highest high, lowest low, and median price over a customizable lookback period. Whenever price establishes a new channel high
Plots kernel-smoothed price zones on the price chart using a Rational Quadratic kernel from an imported library. It builds an inner and an outer high-low zone from 15-minute highs and lows, plus a smoothed close and a midline, and marks bullish or bearish bars
Dynamic Linear Regression calculates and plots linear regression trendlines and standard deviation channels directly on the price chart over a user-selected time period. Traders can configure static channels locked at the end time, dynamic channels that contin
This indicator plots optional candlestick pattern signals on the price chart. It detects engulfing bars, inside bars, HOLP and LOHP, kicker patterns, body-mass extremes, higher highs and lower lows, ATR warnings, and four-bar fractals. Optional pivot marks use
This indicator overlays trend-following Supertrend bands on the price chart using Average True Range calculations. It plots trailing stop lines, highlights active trend directions, and prints buy or sell shape labels when price closes across band thresholds. I