Strike breakdown
Bar charts under the price chart show options at each strike (option price level), one chart per expiry date.
Calls (bets on a rise) point up and puts (bets on a fall) point down. Bars show open interest (contracts still open) by default, and the Lens switches to today's trading. A tall bar marks a crowded strike, a level traders may defend or target. Use it on a coin, a CME (Chicago futures exchange) future or a US stock before an expiry arrives.
Under the hood: it reads option_contract_state.cells on the live bar (Data sources). It sums option_contract_flow.cells by contract over today's bars (Data sources), both through their present masks (The present mask and partial bars). They feed three frames for three panel.bars on a number axis of strikes (Bars). Each has a title and caption written on each run (Frames, panels and compact widgets). It uses optionsTradeDay for the days to go, and optionsAsOfMs and optionsLiveUntilMs for the crypto expiries still trading (the options functions). It uses fbExpiryLabel for each chart's date (Panel frames) and market.option_contract() for an option contract's own chart (Quick reference). This is also the strike-breakdown template: the Strike Breakdown card under Beyond the time axis in the editor's starter list. It compiles as written.
The wrun indicator
// Strike Breakdown: this symbol's options by strike, in up to three bar charts under the price chart, one per expiry. A
// strike is an option's price level, and an expiry is the date an option ends. Each chart shows calls (bets on a rise)
// beside puts (bets on a fall) at every strike. The Lens setting picks what the bars measure. Open interest (contracts
// still open) is the default. The others are its change since yesterday, contracts today, premium (money paid for
// options) today, and net premium today. Net premium is money paid at the ask minus money paid at the bid. At the ask
// means buyers paid the seller's price, at the bid sellers took the buyer's price. For open interest, contracts and
// premium, puts draw below zero, so calls point up and puts point down. Each chart's title names its date and days to
// go, and its caption totals calls and puts. A tall bar marks a strike traders crowd into, a level they may defend or
// target. Use it to see where the bets sit before each expiry.
//
// Under the hood: the lens picks what each bar measures: open interest, its change since the prior day, contracts
// traded today, premium traded today, or today's net premium (at the ask minus at the bid); the three lenses that only
// grow draw the puts below zero, and the two signed ones keep each side's own sign. Up to three charts sit under the
// price chart, the nearest expiries first (on crypto an expiry leaves once it expires at the live bar's close), each
// titled by its date (17 Oct, or 15 Jan '27 in another year) and days to go with the calls' and puts' totals in its
// caption. Open interest and today's contracts (coins on crypto) come from the chain summary on the newest bar; the
// premium lenses sum each contract's flow over today's bars (VWAP times contracts times the market's option multiplier;
// without the VWAP or the multiplier, the premium at the ask plus at the bid), today being the trade date on the
// market's clock. A bar of today served in part makes the premium lenses a floor: the caption leads with the at-least
// sign. The strikes shown sit within the window you set around the close; on an option contract's own chart
// (market.option_contract(), whose price axis is the contract's premium) each chart centres on the expiry's middle
// strike instead and its title says so. Net premium sides every print, cross trades and late prints too: under that
// lens each chart's caption says so after the totals.
param.choice("lens", ["open interest", "open interest change", "contracts today", "premium today", "net premium today"], "open interest", { label: "Lens", description: "What the bars measure: open interest (contracts still open), its daily change, contracts or premium today, or net premium. Premium is the money paid for options. Net premium today includes cross and late trades." });
param.int("charts", 2, { min: 1, max: 3, label: "Expiries", description: "How many bar charts to show, one per upcoming expiry date, nearest first" });
param.number("window_pct", 8, { min: 1, max: 15, step: 0.5, label: "Strike window, percent", description: "Shows strikes (option price levels) within this percent of the price, up to 15%" });
input("close", ohlcv.close); // the chart's own close: the strike window's centre
input("state", option_contract_state.cells, { max_cells: 6000, expiries: "nearest:6", strike_window_pct: 15, description: "This symbol's options summary on the newest bar: open interest, yesterday's open interest and contracts today. It covers the six nearest expiry dates and strikes within 15% of the price." }); // [root_code, expiry_ms, side_cp, strike, bid, ask, last, prev_close, theta, volume_day, oi, oi_prev, present] per contract
input("flow", option_contract_flow.cells, { max_cells: 6000, expiries: "nearest:6", strike_window_pct: 15, description: "Each contract that traded in the bar, the six nearest expiries, strikes within 15% of the underlying" }); // [root_code, expiry_ms, side_cp, strike, vol_ask, vol_bid, vol_mid, vol_none, prem_ask, prem_bid, share_delta_net, vwap, last_price, iv_last, vol_above_ask, vol_below_bid, present] per contract
market.zone(); // the market's clock: today's trade date and each expiry's
market.option_multiplier(); // the chain's USD per price unit and size unit: 100 on a US stock, 50 on ES, 1 on a coin; 0 unknown
market.option_contract(); // 1 on an option contract's own chart: its close is the contract's premium, never a centre for strikes
chart.interval_sec(); // the bar's length: the newest bar's options data is read at its close
// The readings, data-only, on the newest bar: the nearest expiry's totals under the lens.
output("front_calls", none, overlay, { format: "si", description: "The nearest expiry's calls (bets on a rise) under the Lens, over the strikes shown. Newest bar only." });
output("front_puts", none, overlay, { format: "si", description: "The nearest expiry's puts (bets on a fall) under the Lens, over the strikes shown. Newest bar only." });
output("front_days", none, overlay, { description: "Days left until the nearest expiry date. Newest bar only." });
output("partial", none, overlay, { description: "1 once only part of a bar's options data arrived today. The premium totals are then a minimum." });
const expiry_1 = frame("expiry_1", { max_bytes: 16384 });
const expiry_2 = frame("expiry_2", { max_bytes: 16384 });
const expiry_3 = frame("expiry_3", { max_bytes: 16384 });
panel.bars({ name: "first_expiry", title: "Nearest expiry", x: "number", place: "below", frame: expiry_1, orientation: "vertical", series: [{ name: "Calls", color: "theme.up" }, { name: "Puts", color: "theme.down" }], format: "si", x_title: "Strike", hover_card: true, legend_style: "title", height_frac: 0.2 });
panel.bars({ name: "second_expiry", title: "Second expiry", x: "number", place: "below", frame: expiry_2, orientation: "vertical", series: [{ name: "Calls", color: "theme.up" }, { name: "Puts", color: "theme.down" }], format: "si", x_title: "Strike", hover_card: true, legend_style: "title", height_frac: 0.2 });
panel.bars({ name: "third_expiry", title: "Third expiry", x: "number", place: "below", frame: expiry_3, orientation: "vertical", series: [{ name: "Calls", color: "theme.up" }, { name: "Puts", color: "theme.down" }], format: "si", x_title: "Strike", hover_card: true, legend_style: "title", height_frac: 0.2 });
const STATE = 13; // f64s per contract: OPTION_CONTRACT_STATE_TUPLE
const FLOW = 17; // OPTION_CONTRACT_FLOW_TUPLE
const CAP = 4096; // contracts today's flow table holds (a power of two), an eighth of it kept free
const MAX_EXPIRIES = 8; // expiries the newest bar sorts
const MAX_STRIKES = 512; // strikes one chart draws: ES's 5-point ladder holds about 400 in a 15% window
// Today's flow by contract: the key (root, expiry, call or put, strike), then the premium and the net premium.
const keyRoot = new StaticArray<f64>(CAP);
const keyExpiry = new StaticArray<f64>(CAP);
const keySide = new StaticArray<f64>(CAP);
const keyStrike = new StaticArray<f64>(CAP);
const premiumOf = new StaticArray<f64>(CAP);
const netOf = new StaticArray<f64>(CAP);
const used = new StaticArray<bool>(CAP);
const expiryList = new StaticArray<f64>(MAX_EXPIRIES); // the upcoming expiries, nearest first
const strikeAt = new StaticArray<f64>(MAX_STRIKES); // one chart's strikes, ascending, and each side's value
const callAt = new StaticArray<f64>(MAX_STRIKES);
const putAt = new StaticArray<f64>(MAX_STRIKES);
let lens = 0; // settings, read in onStart()
let charts = 2;
let windowShare = 0.08;
let zone = 0; // the market facts, read in onStart()
let optMult: f64 = NaN; // NaN where the host does not know the multiplier: the premium falls back to the sided floor
let optionContract = false; // the chart is one option contract's own: every chart centres on the expiry's middle strike
let intervalMs = 0.0; // the bar's length in milliseconds; 0 where the host writes none
let asOfMs: f64 = NaN; // the newest bar's as-of: its close
let day: f64 = NaN; // today's trade date on the market's clock, as a day number
let stored = 0; // contracts in today's table
let dropped = false; // a contract found the table full
let partialToday = false;
let strikes = 0; // strikes in the chart being built
function onStart(): void {
lens = i32(p_lens());
charts = i32(p_charts());
windowShare = p_window_pct() / 100.0;
zone = i32(p_market_zone());
optMult = p_market_option_multiplier() > 0.0 ? p_market_option_multiplier() : NaN;
optionContract = i32(p_market_option_contract()) == 1;
intervalMs = p_chart_interval_sec() * 1000.0;
}
// ── Today's flow by contract ──
function slotOf(root: f64, expiry: f64, side: f64, strike: f64): i32 { // the contract's slot, or -1 when the table is full
let h: u64 = u64(expiry) * 0x2545f4914f6cdd1d;
h ^= u64(Math.round(strike * 1000.0)) * 0x27d4eb2f165667c5;
h ^= u64(root) * 0x165667b19e3779f9;
h ^= u64(side > 0.0 ? 1 : 2);
let at = i32(h & u64(CAP - 1));
for (let probe = 0; probe < CAP; probe += 1) {
if (!used[at]) {
if (stored >= CAP - CAP / 8) return -1; // keep an eighth free so a probe ends quickly
used[at] = true;
keyRoot[at] = root;
keyExpiry[at] = expiry;
keySide[at] = side;
keyStrike[at] = strike;
premiumOf[at] = 0.0;
netOf[at] = 0.0;
stored += 1;
return at;
}
if (keyExpiry[at] == expiry && keyStrike[at] == strike && keySide[at] == side && keyRoot[at] == root) return at;
at = (at + 1) & (CAP - 1);
}
return -1;
}
function startDay(today: f64): void {
day = today;
for (let i = 0; i < CAP; i += 1) used[i] = false;
stored = 0;
dropped = false;
partialToday = false;
}
function addFlow(cells: StaticArray<f64>, n: i32): void { // one bar's contracts into today's table
for (let i = 0; i + FLOW - 1 < n; i += FLOW) {
if (isPartial(cells[i + 16])) partialToday = true;
if (!(cells[i + 3] > 0.0)) continue; // no strike: the chart's marker for a bar served in part
const at = slotOf(cells[i], cells[i + 1], cells[i + 2] > 0.0 ? 1.0 : -1.0, cells[i + 3]);
if (at < 0) {
dropped = true;
continue;
}
const contracts = cells[i + 4] + cells[i + 5] + cells[i + 6] + cells[i + 7];
const sided = cells[i + 8] + cells[i + 9];
const total = hasBit(cells[i + 16], 0) ? cells[i + 11] * contracts * optMult : sided; // bit 0: the VWAP; else the two sides, a floor
premiumOf[at] += total > sided ? total : sided; // an unknown multiplier (NaN) keeps the floor too
netOf[at] += cells[i + 8] - cells[i + 9];
}
}
// ── One chart ──
function addStrike(strike: f64, side: f64, value: f64): void { // a value into the chart's row for its strike
let j = 0;
while (j < strikes && strikeAt[j] < strike) j += 1;
if (j == strikes || strikeAt[j] != strike) {
if (strikes == MAX_STRIKES) return;
for (let k = strikes; k > j; k -= 1) {
strikeAt[k] = strikeAt[k - 1];
callAt[k] = callAt[k - 1];
putAt[k] = putAt[k - 1];
}
strikeAt[j] = strike;
callAt[j] = 0.0;
putAt[j] = 0.0;
strikes += 1;
}
if (side > 0.0) callAt[j] += value;
else putAt[j] += value;
}
// The expiry's strikes under the lens, within the window around `centre`.
function collect(expiry: f64, centre: f64): void {
strikes = 0;
if (lens <= 2) {
const n = in_state_cells();
if (n <= 0) return;
const cells = in_state_view();
for (let i = 0; i + STATE - 1 < n; i += STATE) {
const strike = cells[i + 3];
if (cells[i + 1] != expiry || !(strike > 0.0) || Math.abs(strike / centre - 1.0) > windowShare) continue;
const present = cells[i + 12];
let value: f64 = NaN;
if (lens == 0 && hasBit(present, 10)) value = cells[i + 10]; // bit 10: the open interest
else if (lens == 1 && hasBit(present, 10) && hasBit(present, 11)) value = cells[i + 10] - cells[i + 11]; // bit 11: the prior day's
else if (lens == 2 && hasBit(present, 9)) value = cells[i + 9]; // bit 9: contracts today
if (!isNaN(value)) addStrike(strike, cells[i + 2], value);
}
return;
}
for (let at = 0; at < CAP; at += 1) {
const strike = keyStrike[at];
if (!used[at] || keyExpiry[at] != expiry || Math.abs(strike / centre - 1.0) > windowShare) continue;
addStrike(strike, keySide[at], lens == 3 ? premiumOf[at] : netOf[at]);
}
}
// The centre the window sits on: the close, unless the chart is an option contract's own or no strike of the expiry
// lies within the window around it, then the expiry's middle strike.
function centreOf(expiry: f64, close: f64): f64 {
let low = Infinity;
let high = -Infinity;
let near = false;
const n = in_state_cells();
if (n > 0) {
const cells = in_state_view();
for (let i = 0; i + STATE - 1 < n; i += STATE) {
const strike = cells[i + 3];
if (cells[i + 1] != expiry || !(strike > 0.0)) continue;
if (strike < low) low = strike;
if (strike > high) high = strike;
if (close > 0.0 && Math.abs(strike / close - 1.0) <= windowShare) near = true;
}
}
for (let at = 0; at < CAP; at += 1) {
if (!used[at] || keyExpiry[at] != expiry) continue;
const strike = keyStrike[at];
if (strike < low) low = strike;
if (strike > high) high = strike;
if (close > 0.0 && Math.abs(strike / close - 1.0) <= windowShare) near = true;
}
if (near && !optionContract) return close;
return high >= low ? (low + high) / 2.0 : close;
}
// The upcoming expiries in the chain summary and today's flow, nearest first; their count.
function listExpiries(today: f64, nowMs: f64): i32 {
let count = 0;
const n = in_state_cells();
if (n > 0) {
const cells = in_state_view();
for (let i = 0; i + STATE - 1 < n; i += STATE) count = offerExpiry(cells[i + 1], today, nowMs, count);
}
for (let at = 0; at < CAP; at += 1) if (used[at]) count = offerExpiry(keyExpiry[at], today, nowMs, count);
return count;
}
function offerExpiry(expiry: f64, today: f64, nowMs: f64, count: i32): i32 { // upcoming: today's or later; on crypto (zone 0) still trading at the as-of, the 08:00 UTC daily gone once it expired
if (!(expiry > 0.0) || (zone == 0 ? !(optionsLiveUntilMs(expiry, zone) > nowMs) : optionsTradeDay(expiry, zone) < today)) return count;
let j = 0;
while (j < count && expiryList[j] < expiry) j += 1;
if (j < count && expiryList[j] == expiry) return count;
if (j == MAX_EXPIRIES) return count;
for (let k = (count < MAX_EXPIRIES ? count : MAX_EXPIRIES - 1); k > j; k -= 1) expiryList[k] = expiryList[k - 1];
expiryList[j] = expiry;
return count < MAX_EXPIRIES ? count + 1 : count;
}
function places(value: f64): i32 { // a coin's open interest or contracts (zone 0) to four decimals; whole values and premium bare
return zone == 0 && lens <= 2 && value != Math.floor(value) ? 4 : 0;
}
function fbCompact(value: f64): void { // 1.2M, 340K, -12K, 12.50 (a coin amount): the number in a few characters
const size = Math.abs(value);
if (size >= 1e9) {
fb_f64(value / 1e9, 1);
fb_text("B");
} else if (size >= 1e6) {
fb_f64(value / 1e6, 1);
fb_text("M");
} else if (size >= 1e3) {
fb_f64(value / 1e3, 1);
fb_text("K");
} else fb_f64(value, places(value) > 0 ? 2 : 0);
}
function writeChart(slot: i32, expiry: f64, today: f64): void {
let calls = 0.0;
let puts = 0.0;
for (let k = 0; k < strikes; k += 1) {
calls += callAt[k];
puts += putAt[k];
}
if (slot == 0) {
out_front_calls(calls);
out_front_puts(puts);
out_front_days(optionsTradeDay(expiry, zone) - today);
}
const days = i64(optionsTradeDay(expiry, zone) - today);
fb_clear();
fb_text("{\"title\":\"");
fbExpiryLabel(expiry, asOfMs, zone); // the expiry's trade date: 17 Oct, or 15 Jan '27 in another year
fb_text(", ");
if (days == 0) fb_text("today");
else {
fb_int(days);
fb_text(days == 1 ? " day" : " days");
}
if (optionContract) fb_text(" · middle strike"); // the window sits on the expiry's middle strike, never the contract's price
fb_text("\",\"caption\":\"");
if (lens >= 3 && (partialToday || dropped)) fb_text("≥ "); // at least: a bar served in part, or a full table, makes it a floor
fb_text("C ");
fbCompact(calls);
fb_text(" / P ");
fbCompact(puts);
if (lens == 4) fb_text(" · Includes cross and late trades"); // net premium sides every print
fb_text("\",\"rows\":[");
for (let k = 0; k < strikes; k += 1) {
if (k > 0) fb_text(",");
fb_text("[");
fb_num(strikeAt[k]);
fb_text(",");
fb_f64(callAt[k], places(callAt[k]));
fb_text(",");
fb_f64(lens == 0 || lens == 2 || lens == 3 ? -putAt[k] : putAt[k], places(putAt[k])); // a one-sided lens draws the puts below zero
fb_text("]");
}
fb_text("]}");
writeFrameBuffer(slot == 0 ? expiry_1 : slot == 1 ? expiry_2 : expiry_3);
}
// onBar() runs once per bar: a new trade date empties today's table; the bar's contracts join it; on the newest bar,
// one chart per upcoming expiry from the chain summary or today's table.
function onBar(): void {
const close = bar.close();
const today = optionsTradeDay(bar.time() * 1000.0, zone);
if (today != day) startDay(today);
const n = in_flow_cells();
if (n > 0) addFlow(in_flow_view(), n);
out_partial(n < 0 ? NaN : partialToday ? 1.0 : 0.0);
if (!bar.isLast()) {
out_front_calls(NaN);
out_front_puts(NaN);
out_front_days(NaN);
return;
}
asOfMs = optionsAsOfMs(bar.time() * 1000.0, intervalMs); // the newest bar's as-of: its close time
const count = listExpiries(today, asOfMs);
if (count == 0) {
out_front_calls(NaN);
out_front_puts(NaN);
out_front_days(NaN);
return; // no chart: an unwritten frame leaves its chart off
}
for (let slot = 0; slot < charts && slot < count; slot += 1) {
const expiry = expiryList[slot];
collect(expiry, centreOf(expiry, close));
writeChart(slot, expiry, today);
}
}How it works
Two inputs, the six nearest expiries. Both inputs keep the six nearest expiries (expiries: "nearest:6") and the strikes within 15% of the underlying (strike_window_pct: 15), up to 6,000 contracts each. The chain summary arrives on the live bar with each contract's open interest (oi, bit 10), the prior observation (oi_prev, bit 11) and its contracts today (volume_day, bit 9). The flow arrives on every bar, one tuple per contract that traded in it.
Today's flow by contract. Today is the trade date of the bar's open on the market's clock (market.zone(): the New York date on a US stock), and each expiry's date reads on the same clock; on a new trade date the table starts again. Each bar's contracts join a table keyed by the contract (root, expiry, call or put, strike): its premium (its VWAP times its contracts times the market's option multiplier, the chart's market fact market.option_multiplier(), 100 shares on a US stock, 50 on ES, 1 on a coin, never less than its premium at the ask plus at the bid, which stands in alone when it carries no VWAP or the chart does not know the multiplier) and its net premium (at the ask minus at the bid, where the data plane judges each print by the midpoint of the national best bid and offer just before it on a US stock, and a crypto venue or CME names the taker's side). The table holds 3,584 contracts (4,096 slots, an eighth kept free); a contract past that is left out, and the premium totals in the captions then read as a floor.
The lens. Lens picks each strike's two numbers: open interest (the default), open interest change (open interest minus the prior observation, for the contracts that carry both), contracts today, all three from the chain summary, or premium today and net premium today from the flow table. Open interest, contracts and premium only grow, so the puts draw below zero; the change and the net premium are signed, so each side keeps its own sign.
One chart per expiry. Expiries (2, up to 3) is how many charts stand under the price chart: the upcoming expiries in the chain summary and in today's flow (today's included), nearest first. On crypto, whose dailies expire at 08:00 UTC, an expiry is upcoming while it still trades at the newest bar's close (optionsAsOfMs, optionsLiveUntilMs), so once the newest bar closes at 08:00 UTC or later, tomorrow's daily leads (17 Oct, 1 day). Each chart keeps that expiry's strikes within Strike window, percent (8, up to the 15 the inputs read) of the close, up to 512 strikes (ES's 5-point ladder holds about 400 in a 15% window), calls in the up colour and puts in the down colour at each strike on a number axis, titled by the expiry's label (fbExpiryLabel) and days to go (16 Oct, today on the expiry day). A coin's open interest and contracts keep their decimals: 12.5 BTC on its bar, two decimals in the caption under 1,000 (C 16.50 / P 7.75). The caption sums each side over the strikes shown (C 1.2M / P 900.0K); under a premium lens it leads with ≥ when a bar of today was served in part or the table was full. A chart the setting does not ask for is never written, so it stays off the screen.
The readings. Data-only outputs on the live bar: front_calls and front_puts (the nearest expiry's two totals under the lens, over the strikes shown) and front_days (its days to go), with partial on every bar (1 once a bar of today was served in part).
Cross and late trades. The data plane sides every print by the quote, cross trades and late or out-of-sequence prints included, because the feed carries no sale conditions, so a source that leaves those prints unsided shows a different net premium. The package says so where its net premium shows: each chart's caption under the net premium lens, after the totals, and the hint of Lens.
What the settings do
- Lens: What the bars measure: open interest (contracts still open), its daily change, contracts, premium or net premium today.
- Expiries: How many bar charts to show, one per upcoming expiry date, nearest first.
- Strike window, percent: Shows strikes within this percent of the price, up to 15%.
Where it runs
It runs on coins with listed options and reads the coin's own options. A copy you run from the editor (where you write and run your own indicators) reads them too. On a US stock or ETF chart with US listed options, every indicator in your browser can read this data. On a futures chart from CME, the Chicago exchange, every indicator in your browser can read it too, once you accept the CME market data terms (Limitations). Alerts and Protected indicators (published ones that run on OpenMarket's servers) cannot read this data. They stop with an error that names it. On an option contract's own chart, it reads the options of the contract's stock or coin. That chart's price is the contract's own price, so each bar chart centres on its expiry's middle strike instead. The middle strike sits halfway between the lowest and the highest strike. The title then ends in · middle strike, as in 23 Oct, 6 days · middle strike. The indicator spots an option contract's chart by itself. Elsewhere, a bar chart also centres on the middle strike when none of its strikes sits near the price. More than 6,000 contracts at once stops the run rather than cutting data. US options data is 15 minutes behind unless you have real-time US options data. CME data is 10 minutes behind unless your account has real-time CME access. The chart's legend says which you see.
When data is missing
- No upcoming expiry. With no options summary and no trades today on the newest bar, no bar chart appears. The three readings in the Console (the editor's panel that prints values) then stay empty.
- No data. A bar older than the chart's options history adds nothing, and the Console's
partialreading stays empty on it. - Part of a bar. Sometimes only part of a bar's options data arrives. On a busy symbol, an older bar may come as one empty marker instead of its contracts. This indicator never counts that marker as a contract. Once that happens today, the Console's
partialreading shows 1. The premium captions then start with≥, so today's premium is at least what they show. - A strike without a value. A contract without the Lens's value adds nothing to its strike. That means no open interest, no earlier reading, or no contracts today.
Customize it
- Where the new positions are. Set Lens to open interest change: the strikes that gained contracts since the prior day stand out above and below zero.
- Today's money. Set Lens to premium today with three charts: the dollars spent at each strike of the three nearest expiries.
- A wider view. Raise Strike window to 15, the widest the inputs read, on a quiet stock, or lower it to 3 on an index ETF, where strikes sit a dollar apart.
Run it
- In the editor's Explorer, press the Templates icon ("Browse starter templates") and pick Strike Breakdown under Beyond the time axis.
- Press Run on a Deribit BTC chart or on a US stock chart such as SPY: the two nearest expiries stand under the chart by strike; on a US stock the legend names the tier the read was served at.
- At the editor's Console prompt, type
front_callsandfront_putsto read the nearest expiry's totals under the lens.
Concepts used
- Data sources for
option_contract_stateandoption_contract_flow, their tuples and their knobs, and The present mask and partial bars forhasBit,isPartialand bit 14 - Bars and Frames, panels and compact widgets for
panel.barsover frames on a number axis, a per-run title and caption, and an unwritten frame leaving its panel off - Options kit for
optionsTradeDay,optionsAsOfMsandoptionsLiveUntilMs - Panel frames for
fbExpiryLabel, and the Quick reference formarket.option_contract()