Day type

View as MarkdownOpen the editor

Every 10 minutes the card reads Pinned (tight range), Trending (one way), Volatile (wide swings) or Unsettled (none of these).

The card shows how often each state held 30 minutes to 2 hours later, and how far price moved. A dashed line marks the gamma flip, where dealers (options market makers) switch from calming price to pushing it. Two more mark the call and put walls (the strikes with the most dealer hedging). On a 10-minute or finer chart with live options, trade against Pinned moves and with Trending ones.

Under the hood: it reads this symbol's price, its 1-day at-the-money implied volatility and the dealer gamma levels from the 10-minute options statistics. That is option_stats_10m with missing: "nan", so each sample lands on its own bar (Data sources). It sizes each window's 1σ move with oneSigmaMove over the market's trading minutes. It counts the odds from outcomes in the loaded history rather than from a model. It draws the forward range as a box handle on the live bar (Drawing objects). It draws step lines for the walls and the gamma flip over all expiries, labelled Gamma flip · all expiries. It adds a ribbon shaded by state and a render.hud card. It is the day-type template: Day Type under HUDs in the editor's starter list, and it compiles as written.

The wrun indicator

// Day Type: what kind of session this is, and how often that kind has lasted. Every ten minutes it names a state from
// the last hour of prices. Pinned: price stays in a narrow range. Trending: price keeps moving one way. Volatile: price
// swings wide. Unsettled: none of these. Ranges are measured against the move option prices expect (one standard
// deviation, the 1σ move). The card shows how often the state held 30 minutes to 2 hours later, and how far price
// usually moved. A box ahead of the price shows that typical range. A dashed line marks the gamma flip, where dealers
// (options market makers) switch from calming price to pushing it. Two more mark the call and put walls (the strikes
// with the most dealer hedging). Use it to trade against moves on pinned days and follow them on trending days.
//
// Under the hood: the readings come from the 10-minute options statistics (option_stats_10m: the underlying's price,
// its 1-day at-the-money IV and the dealer gamma levels every ten minutes, on the underlyings the data plane samples
// that often). Each sample names a state from the last Window samples of the session: Volatile when the window's
// high-low range is at least Volatile range times the window's 1σ move at the 1-day IV (the options kit's
// oneSigmaMove over the market's trading minutes), Trending when the price kept going one way (its net move over the
// path it took, at least Trend efficiency) over a range of at least Pinned range times that 1σ move, Pinned when the
// range is under that, Unsettled otherwise. The odds that a state holds are counted, not modelled: every earlier
// sample in the loaded history whose session reached 30, 60, 90 and 120 minutes further is an outcome, and the odds
// are the share of those outcomes still in the same state, with the typical move (the mean absolute move, percent)
// over the same horizons. The forward range is the price plus and minus the typical move at the longest horizon with
// odds, boxed ahead of the live bar. The call wall, the put wall and the data plane's gamma flip over all expiries
// (the gamma curve's zero nearest spot, the options kit's rule) ride the price as step lines, a ribbon under the
// chart marks each sample's state in monochrome tiers (Pinned and Unsettled in the text colour, Trending muted,
// Volatile in the grid colour), and a card at the bottom right reads the state, how firmly it holds (strong at 75%
// over the next hour, moderate at 50%), the odds, the moves and the distance to each level. The state is inferred
// from price and IV with the rules above; it is not a direction. The history is short today (the 10-minute statistics
// start when the data plane switches the job on): odds need Minimum outcomes (20) per state and horizon, and until
// then the card says how many there are. Charts of 10 minutes or finer on the sampled underlyings (every one whose
// options quote live); an underlying with daily statistics (option_daily) and no 10-minute rows reads "No live option
// quotes, daily numbers only".

param.int("window_samples", 6, { min: 3, max: 18, label: "Window, samples", description: "How many 10-minute samples each state looks back over. 6 is the last hour." });
param.number("volatile_ratio", 1.5, { min: 0.5, max: 5, step: 0.1, label: "Volatile range", description: "A window is Volatile when its high-to-low range reaches this many 1σ moves. A 1σ move is one standard deviation, from the 1-day implied volatility (IV)." });
param.number("pinned_ratio", 0.6, { min: 0.1, max: 2, step: 0.05, label: "Pinned range", description: "A window is Pinned when its range stays under this many 1σ moves (one standard deviation, from the 1-day IV)." });
param.number("trend_efficiency", 0.6, { min: 0.1, max: 1, step: 0.05, label: "Trend efficiency", description: "A window is Trending when its net move, divided by the path it took, reaches this. Its range must not be Pinned." });
param.int("min_outcomes", 20, { min: 5, max: 500, label: "Minimum outcomes", description: "How many outcomes (earlier times the same state was seen) a state needs per horizon before its odds show." });
param.bool("show_levels", true, { label: "Levels", description: "Draw the call wall, the put wall and the gamma flip on the price chart." });
input("close", ohlcv.close); // the chart's own close: the grid
input("spot", option_stats_10m.underlying_price, { missing: "nan", description: "This symbol's price at each 10-minute sample of the options statistics." }); // lands on the bar holding the sample, NaN elsewhere
input("iv1d", option_stats_10m.atm_iv_1d, { missing: "nan", description: "The 1-day at-the-money implied volatility (IV), in percent. It sets each window's 1σ move." });
input("gex", option_stats_10m.net_gex, { missing: "nan", description: "Net gamma over all expiries: the dollars dealers must trade for each 1% move." });
input("flip", option_stats_10m.gamma_flip, { missing: "nan", description: "The gamma flip over all expiries: the price nearest now where dealer gamma crosses zero." });
input("call_wall", option_stats_10m.call_wall, { missing: "nan", description: "The call wall: the call strike with the most dealer hedging, often a ceiling." });
input("put_wall", option_stats_10m.put_wall, { missing: "nan", description: "The put wall: the put strike with the most dealer hedging, often a floor." });
input("daily_spot", option_daily.underlying_price, { missing: "nan", description: "This symbol's price in the daily options statistics. Daily numbers with no 10-minute ones mean no live option quotes." }); // lands on the first bar of its UTC day, NaN elsewhere
market.zone(); // the market's clock: the session a sample belongs to and the minutes a year the 1-day IV spans
output("call_wall_line", line, overlay, { color: "theme.up", width: 1, step: true, label: "Call wall", format: "price", description: "The call wall, the call strike with the most dealer hedging. It holds until the next sample." });
output("put_wall_line", line, overlay, { color: "theme.down", width: 1, step: true, label: "Put wall", format: "price", description: "The put wall, the put strike with the most dealer hedging." });
output("flip_line", line, overlay, { color: "theme.muted", width: 1, step: true, line_style: "dashed", label: "Gamma flip · all expiries", format: "price", description: "The gamma flip over all expiries: the price nearest now where dealer gamma crosses zero." });
output("ribbon", histogram, lower, { color_by: "state", colors: ["theme.text", "theme.muted", "theme.grid"], label: "State", format: "0", description: "1 on every bar with a state. Pinned and Unsettled use the text colour, Trending is muted, Volatile uses the grid colour." });
output("state", none, lower, { description: "0 Pinned, 1 Trending, 2 Volatile, 3 Unsettled. Blank until the session has enough samples." });
output("strength", none, lower, { description: "How firmly the state holds over the next hour: 0 weak, 1 moderate (50%), 2 strong (75%). Blank without odds." });
output("odds_30", none, lower, { format: "%", description: "How often this state was still in place 30 minutes later, in percent of earlier outcomes." });
output("odds_60", none, lower, { format: "%", description: "The same, 60 minutes later." });
output("odds_90", none, lower, { format: "%", description: "The same, 90 minutes later." });
output("odds_120", none, lower, { format: "%", description: "The same, 120 minutes later." });
output("move_30", none, lower, { description: "The typical move 30 minutes after this state, up or down, in percent." });
output("move_60", none, lower, { description: "The same, 60 minutes later, in percent." });
output("move_90", none, lower, { description: "The same, 90 minutes later, in percent." });
output("move_120", none, lower, { description: "The same, 120 minutes later, in percent." });
output("range_ratio", none, lower, { description: "The window's high-to-low range divided by its 1σ move from the 1-day IV." });
output("efficiency", none, lower, { description: "The window's net move divided by the path it took, 0 to 1. Near 1 means price went one way." });
output("gex", none, lower, { format: "usd", description: "Net gamma over all expiries at the sample, in dollars per 1% move." });
output("dist_call", none, lower, { description: "How far the call wall sits from the price, in percent. Positive means above." });
output("dist_put", none, lower, { description: "How far the put wall sits from the price, in percent. Negative means below." });
output("dist_flip", none, lower, { description: "How far the gamma flip sits from the price, in percent. Positive means above." });
output("outcomes", none, lower, { description: "How many outcomes the state has at 60 minutes." });
output("status", none, lower, { description: "0 waiting for samples or outcomes, 1 the odds show, 2 the chart is coarser than 10 minutes." });
string("read", { max_bytes: 64 }); // the headline: the state and how firmly it holds
string("odds_text", { max_bytes: 64 }); // the odds, or why there are none
string("title", { max_bytes: 64 });
handles.box({ opacity: 0.18, borderWidth: 1 }); // the forward range, boxed ahead of the live bar

render.hud("day_type_card", {
  position: "bottom_right",
  title: "{{title}}",
  columns: 2,
  tiles: [
    tile.pill("State", "read", { headline: true }),
    tile.pill("Holds", "odds_text"),
    tile.rows([
      ["Holds 30 min", "odds_30", "%"],
      ["Holds 1 hour", "odds_60", "%"],
      ["Holds 90 min", "odds_90", "%"],
      ["Holds 2 hours", "odds_120", "%"],
      ["Typical move, 1 hour, %", "move_60", "0.00"],
      ["Typical move, 2 hours, %", "move_120", "0.00"],
      ["To call wall, %", "dist_call", "0.00"],
      ["To put wall, %", "dist_put", "0.00"],
      ["To gamma flip, %", "dist_flip", "0.00"],
      ["Net gamma, all expiries", "gex", "usd"],
    ]),
  ],
});

const DAY = 86400.0;
const SAMPLE_SEC = 600.0; // the statistics' cadence
const MAX_SESSION = 144; // samples a session can hold: crypto's 24-hour UTC day (09:30 to 16:15 New York is 41)
const STATES = 4;
const HORIZONS = 4;
const HORIZON_MIN: StaticArray<f64> = [30.0, 60.0, 90.0, 120.0];
const STATE_WORDS: String[] = ["Pinned", "Trending", "Volatile", "Unsettled"];
const MONTHS: String[] = ["JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"];
const sesT = new StaticArray<f64>(MAX_SESSION); // the session's samples: time, price, state
const sesP = new StaticArray<f64>(MAX_SESSION);
const sesS = new StaticArray<f64>(MAX_SESSION);
const outcomeN = new StaticArray<f64>(STATES * HORIZONS); // per state and horizon: outcomes, held, the moves summed
const outcomeHeld = new StaticArray<f64>(STATES * HORIZONS);
const outcomeMove = new StaticArray<f64>(STATES * HORIZONS);
const rangeBox = draw.box(0);
const dateClock = new Clock("UTC");

let windowN = 6; // settings, read in onStart()
let volatileRatio = 1.5;
let pinnedRatio = 0.6;
let trendEfficiency = 0.6;
let minOutcomes = 20;
let showLevels = true;
let zone = 0; // the market's clock, read in onStart()
let minutesYear = 98280.0; // the year the 1-day IV is scaled over, in the market's trading minutes, read in onStart()
let prevT: f64 = NaN; // the bar spacing
let barSec: f64 = NaN;
let sesDay: f64 = NaN; // the session the arrays hold
let sesN = 0;
let stateNow: f64 = NaN; // the newest sample's readings, held
let ratioNow: f64 = NaN;
let effNow: f64 = NaN;
let lastT: f64 = NaN;
let lastP: f64 = NaN;
let gex: f64 = NaN;
let flip: f64 = NaN;
let callWall: f64 = NaN;
let putWall: f64 = NaN;
let dailyRows = false; // a daily statistics row landed on a loaded bar: the underlying has daily numbers

function onStart(): void {
  windowN = i32(p_window_samples());
  volatileRatio = p_volatile_ratio();
  pinnedRatio = p_pinned_ratio();
  trendEfficiency = p_trend_efficiency();
  minOutcomes = i32(p_min_outcomes());
  showLevels = p_show_levels() > 0.5;
  zone = i32(p_market_zone());
  // 365 days of 1,440 minutes on crypto (zone 0), 252 Globex sessions of 1,380 on CME (zone 2), 252 sessions of 390
  // regular-hours minutes on a US stock.
  minutesYear = zone == 0 ? 525600.0 : zone == 2 ? 347760.0 : 98280.0;
}

/** The trade date a bar's time belongs to on the market's own clock: the UTC day on crypto, the New York date on a US
 *  stock, the CME trade day that opens at 17:00 Chicago on CME, so a Globex session is never split at midnight. */
function sessionOf(t: f64): f64 {
  return sessionTradeDate(t, zone, zone == 2 ? 1020.0 : 0.0);
}

/** The state of the window ending at the newest sample (the rules in the header); NaN while it fills. */
function classify(iv: f64): f64 {
  ratioNow = NaN;
  effNow = NaN;
  if (sesN < windowN || !(iv > 0.0)) return NaN;
  const first = sesN - windowN;
  let lo = sesP[first];
  let hi = lo;
  let path = 0.0;
  for (let k = first + 1; k < sesN; k += 1) {
    const p = sesP[k];
    if (p < lo) lo = p;
    if (p > hi) hi = p;
    path += Math.abs(p - sesP[k - 1]);
  }
  const last = sesP[sesN - 1];
  const minutes = (sesT[sesN - 1] - sesT[first]) / 60.0;
  const sigma = oneSigmaMove(last, iv / 100.0, minutes / minutesYear); // the window's 1σ move, over the market's trading minutes
  if (!(sigma > 0.0)) return NaN;
  ratioNow = (hi - lo) / sigma;
  effNow = path > 0.0 ? Math.abs(last - sesP[first]) / path : 0.0;
  if (ratioNow >= volatileRatio) return 2.0;
  if (ratioNow < pinnedRatio) return 0.0;
  if (effNow >= trendEfficiency) return 1.0;
  return 3.0;
}

/** Each earlier sample of the session exactly a horizon before the newest is an outcome of its state. */
function recordOutcomes(): void {
  const t = sesT[sesN - 1];
  const p = sesP[sesN - 1];
  const s = sesS[sesN - 1];
  for (let k = sesN - 2; k >= 0; k -= 1) {
    const ago = (t - sesT[k]) / 60.0;
    if (ago > HORIZON_MIN[HORIZONS - 1]) break;
    const was = sesS[k];
    if (isNaN(was) || isNaN(s)) continue;
    for (let h = 0; h < HORIZONS; h += 1) {
      if (Math.abs(ago - HORIZON_MIN[h]) > 0.5) continue;
      const at = i32(was) * HORIZONS + h;
      outcomeN[at] += 1.0;
      if (was == s) outcomeHeld[at] += 1.0;
      outcomeMove[at] += Math.abs(p / sesP[k] - 1.0) * 100.0;
    }
  }
}

function addSample(t: f64, p: f64, iv: f64): void {
  const day = sessionOf(t);
  if (day != sesDay) {
    sesDay = day;
    sesN = 0;
  }
  if (sesN >= MAX_SESSION) return;
  if (sesN > 0 && t <= sesT[sesN - 1]) return; // a sample the session already holds
  sesT[sesN] = t;
  sesP[sesN] = p;
  sesN += 1;
  const s = classify(iv);
  sesS[sesN - 1] = s;
  stateNow = s;
  lastT = t;
  lastP = p;
  recordOutcomes();
}

function odds(h: i32): f64 {
  if (isNaN(stateNow)) return NaN;
  const at = i32(stateNow) * HORIZONS + h;
  return outcomeN[at] >= f64(minOutcomes) ? outcomeHeld[at] / outcomeN[at] : NaN;
}

function typicalMove(h: i32): f64 {
  if (isNaN(stateNow)) return NaN;
  const at = i32(stateNow) * HORIZONS + h;
  return outcomeN[at] >= f64(minOutcomes) ? outcomeMove[at] / outcomeN[at] : NaN;
}

function strengthOf(): f64 {
  const o = odds(1);
  if (isNaN(o)) return NaN;
  return o >= 0.75 ? 2.0 : o >= 0.5 ? 1.0 : 0.0;
}

function distance(level: f64): f64 {
  return lastP > 0.0 && level > 0.0 ? (level / lastP - 1.0) * 100.0 : NaN;
}

function sbDay(day: f64): void { // "16OCT"
  dateClock.update(day * DAY);
  if (dateClock.dayOfMonth() < 10) sb_text("0");
  sb_int(dateClock.dayOfMonth());
  sb_text(MONTHS[dateClock.month() - 1]);
}

function sbPct(v: f64): void { // "71%"
  sb_f64(v * 100.0, 0);
  sb_text("%");
}

function writeWords(coarse: bool): void {
  sb_clear();
  const strength = strengthOf();
  if (coarse) sb_text("Needs a 10-minute or finer chart");
  else if (isNaN(lastT) && dailyRows) sb_text("No live option quotes, daily numbers only"); // daily rows, no 10-minute row loaded
  else if (isNaN(lastT)) sb_text("Waiting for the 10-minute options statistics");
  else if (isNaN(stateNow)) {
    sb_text("Window filling: ");
    sb_int(sesN);
    sb_text(" of ");
    sb_int(windowN);
    sb_text(" samples this session");
  } else {
    sb_text(STATE_WORDS[i32(stateNow)]);
    if (!isNaN(strength)) sb_text(strength == 2.0 ? ", holds strongly" : strength == 1.0 ? ", holds moderately" : ", holds weakly");
  }
  str_read_sb();
  sb_clear();
  const n60 = isNaN(stateNow) ? 0.0 : outcomeN[i32(stateNow) * HORIZONS + 1];
  if (coarse || isNaN(stateNow)) sb_text("No odds");
  else if (isNaN(odds(1))) {
    sb_text("Not enough history yet: ");
    sb_int(i64(n60));
    sb_text(" of ");
    sb_int(minOutcomes);
    sb_text(" outcomes");
  } else {
    sb_text("30 min: ");
    if (isNaN(odds(0))) sb_text("-");
    else sbPct(odds(0));
    sb_text(", 1 hour: ");
    sbPct(odds(1));
    sb_text(", 2 hours: ");
    if (isNaN(odds(3))) sb_text("-");
    else sbPct(odds(3));
  }
  str_odds_text_sb();
  sb_clear();
  sb_text("Day type");
  if (!coarse && !isNaN(lastT)) {
    sb_text(", ");
    sbDay(Math.floor(lastT / DAY));
    dateClock.update(lastT);
    sb_text(" ");
    if (dateClock.hour() < 10) sb_text("0");
    sb_int(dateClock.hour());
    sb_text(":");
    if (dateClock.minute() < 10) sb_text("0");
    sb_int(dateClock.minute());
    sb_text(" UTC");
  }
  str_title_sb();
}

/** The forward range: the price plus and minus the typical move at the longest horizon with odds, from the live bar
 *  to that horizon ahead; deleted without one. */
function drawRange(t: f64): void {
  let h = HORIZONS - 1;
  while (h >= 0 && isNaN(typicalMove(h))) h -= 1;
  if (h < 0 || !(lastP > 0.0)) {
    rangeBox.delete(); // every coordinate must be finite: no range, no box
    return;
  }
  const m = typicalMove(h) / 100.0;
  const ink = theme.MUTED; // the state is a word on the card, never a colour
  rangeBox.set(t, lastP * (1.0 + m), t + HORIZON_MIN[h] * 60.0, lastP * (1.0 - m)).fill(ink).color(ink).opacity(0.18).border(1.0);
}

// onBar() runs once per bar: the spacing, a daily row when one lands, then the 10-minute sample when it lands (its
// state, the outcomes it settles, the levels); every bar writes the held readings, and the live bar boxes the forward
// range and writes the card.
function onBar(): void {
  const t = bar.time();
  if (!isNaN(prevT) && t > prevT && (isNaN(barSec) || t - prevT < barSec)) barSec = t - prevT;
  prevT = t;
  const coarse = !isNaN(barSec) && barSec > SAMPLE_SEC + 1.0;
  if (!isNaN(in_daily_spot())) dailyRows = true;
  const p = in_spot();
  if (!coarse && !isNaN(p) && p > 0.0) {
    addSample(t, p, in_iv1d());
    gex = in_gex();
    flip = in_flip();
    callWall = in_call_wall();
    putWall = in_put_wall();
  }
  const levels = showLevels && !coarse;
  out_call_wall_line(levels ? callWall : NaN);
  out_put_wall_line(levels ? putWall : NaN);
  out_flip_line(levels ? flip : NaN);
  const live = !coarse && !isNaN(stateNow) && sessionOf(t) == sesDay;
  out_ribbon(live ? 1.0 : NaN);
  out_state(live ? stateNow : NaN);
  out_strength(live ? strengthOf() : NaN);
  // The odds are a share; the outputs and the card's rows read them in percent.
  out_odds_30(live ? odds(0) * 100.0 : NaN);
  out_odds_60(live ? odds(1) * 100.0 : NaN);
  out_odds_90(live ? odds(2) * 100.0 : NaN);
  out_odds_120(live ? odds(3) * 100.0 : NaN);
  out_move_30(live ? typicalMove(0) : NaN);
  out_move_60(live ? typicalMove(1) : NaN);
  out_move_90(live ? typicalMove(2) : NaN);
  out_move_120(live ? typicalMove(3) : NaN);
  out_range_ratio(live ? ratioNow : NaN);
  out_efficiency(live ? effNow : NaN);
  out_gex(coarse ? NaN : gex);
  out_dist_call(coarse ? NaN : distance(callWall));
  out_dist_put(coarse ? NaN : distance(putWall));
  out_dist_flip(coarse ? NaN : distance(flip));
  out_outcomes(live ? outcomeN[i32(stateNow) * HORIZONS + 1] : NaN);
  out_status(coarse ? 2.0 : live && !isNaN(odds(1)) ? 1.0 : 0.0);
  if (bar.isLast()) {
    writeWords(coarse);
    if (live) drawRange(t);
    else rangeBox.delete();
  }
}

How it works

The window's 1σ move. Over a window of n samples the price moves for (n - 1) times 10 minutes; the window's one-standard-deviation move at the 1-day IV is the options kit's oneSigmaMove(price, IV, minutes / year), price x IV x sqrt(minutes / year), named the 1σ move and never the expected move (which every OpenMarket card reserves for 0.85 of the at-the-money straddle), the year being the minutes the market trades in one, by its clock (market.zone()): 98,280 on a US stock (252 sessions of 390 minutes), 347,760 on a CME future (252 Globex sessions of 1,380) and 525,600 on crypto (365 days of 1,440).

Outcomes settle on the later sample. When a sample arrives, each sample of the same session exactly 30, 60, 90 or 120 minutes before it becomes an outcome of that sample's state: held when the two states match, with the absolute move between them. So the odds on any bar use only what had happened by then. A session is the market's trade date (sessionTradeDate): the UTC day on crypto, the New York date on a US stock and the CME trade day that opens at 17:00 Chicago, so a Globex night is never split at midnight. A session holds up to 144 samples, a whole day of them.

Strength. The share of outcomes that held an hour on: strong at 75% and over, moderate at 50%, weak under.

What the settings do

  • Window, samples: how many 10-minute samples each state looks back over, 6 by default (the last hour).
  • Volatile range: the window is Volatile when its high-to-low range reaches this many 1σ moves, 1.5 by default. A 1σ move is one standard deviation of the move option prices expect.
  • Pinned range: the window is Pinned when its range stays under this many 1σ moves, 0.6 by default.
  • Trend efficiency: the window is Trending when its net move divided by the path it took reaches this, 0.6 by default.
  • Minimum outcomes: how many earlier cases of a state each horizon needs before its odds show, 20 by default.
  • Levels: draws the call and put walls (the strikes with the most dealer hedging) and the gamma flip on price.
  • State: the session's state now, and how firmly it tends to hold.
  • Holds: how often this state was still in place 30 minutes, 1 hour and 2 hours later.
  • Holds 30 min: the share of earlier cases still in this state 30 minutes later.
  • Holds 1 hour: the same share 1 hour later.
  • Holds 90 min: the same share 90 minutes later.
  • Holds 2 hours: the same share 2 hours later.
  • Typical move, 1 hour, %: how far price usually moved, up or down, in the hour after this state.
  • Typical move, 2 hours, %: how far price usually moved over the 2 hours after this state.
  • To call wall, %: how far the call wall sits from the price.
  • To put wall, %: how far the put wall sits from the price.
  • To gamma flip, %: how far the gamma flip sits from the price.
  • Net gamma, all expiries: the dollars dealers (the market makers who hedge options) must trade for each 1% move. Above zero, their hedging calms price.

Where it runs

It needs a chart of 10 minutes or finer. The 10-minute options statistics cover every symbol whose options quote live. On CME (Chicago futures exchange) they cover each futures contract whose options quote live. Other contracts have daily numbers only. Any other symbol has no 10-minute numbers, and the indicator's legend on the chart says so. On a crypto chart the chart reads the coin's own options statistics. So does a copy you run from the editor (where you write and run your own indicators). On a US stock chart every indicator in the browser can read them. They run 15 minutes behind unless you have real-time US options data. On a CME futures chart every indicator in the browser can read them too, once you accept the CME market data terms (Limitations). They run 10 minutes behind unless you have real-time CME data. On a US stock the statistics come from delayed quotes. So the newest sample trails the market by about 15 minutes.

When data is missing

The 10-minute statistics start on the day OpenMarket began recording them, so the odds need history. Each state needs Minimum outcomes (20) at a horizon before its odds show. Until then the card's Holds line reads "Not enough history yet: 7 of 20 outcomes". Early in each session the window needs its samples first. Then the card's State line reads "Window filling: 3 of 6 samples this session". Before the first sample the card reads "Waiting for the 10-minute options statistics". It reads "No live option quotes, daily numbers only" when the symbol has daily statistics but no 10-minute ones. That means its options do not quote live. A chart coarser than 10 minutes reads "Needs a 10-minute or finer chart". Older 10-minute statistics follow an earlier gamma flip rule and often have no flip. The gamma flip line stays empty there. That covers US listed options before 2026-10-20, CME before 2026-10-21 12:10 UTC and a few coins' options (Data sources).

Customize it

  • A longer or shorter look. window_samples of 3 reads the last half hour, 12 the last two hours.
  • Your own edges. Volatile range, Pinned range and Trend efficiency move the rules.
  • Odds sooner. Lower Minimum outcomes, knowing the counts are thinner.

Run it

  1. In the editor's Explorer, press the Templates icon and pick Day Type under HUDs.
  2. Press Run on BTCUSDT's 5-minute chart.
  3. At the editor's Console prompt, type state, odds_60 and move_60.

Concepts used