OPEN-SOURCE SCRIPT

AlgoStorm Expected Move Levels (EML)

1 473
AlgoStorm Expected Move Levels (EML)

A precision options-implied range mapping tool that plots daily and weekly ±1σ and ±2σ expected-move bands from the ATM straddle, from implied volatility, or from an automatic average-range fallback — with a live meter showing how much of the average daily and weekly range has already been consumed.

The AlgoStorm Expected Move Levels (EML) indicator is designed for index and futures traders who trade with the options market's own forecast. The at-the-money straddle is the market's priced bet on how far the underlying travels before expiry; the expected move derived from it defines the range the market is paid to defend. Gamma levels show where dealers defend — the expected move shows how far the market is priced to travel. Together they form the complete options-informed map for index futures, and EML is the second half of that pair.

DATA INPUT — READ BEFORE LOADING
This indicator carries no built-in options data feed. Setup is a single paste. Our free browser-based GEX dashboard includes an Expected Move calculator that auto-fills spot and the ATM straddle from delayed CBOE quotes and emits one CSV line — 1,anchor,dailyStraddle,weeklyStraddle,multiplier (example: 1,6350.25,44.30,94.80,0.85). Drop that line into the EM Data field and every value is populated at once; the leading 1 is a format version the script validates, so a malformed or mismatched paste is flagged on the chart instead of silently plotting nonsense.

Prefer to work from your own options chain? The Manual Entry group still accepts an ATM straddle price (call + put at the strike nearest spot) or an annualized implied-volatility figure, and a valid paste simply takes precedence over it. With the paste field empty and both manual inputs at zero, the script runs standalone on its average-range fallback, so it works out of the box. Refresh the paste once per session, before the open.

Symbol Mode: SPX / ES plots pasted values as-is — SPX options are struck at the same levels ES trades. SPY mode divides the pasted anchor and straddles by 10. Scaling is applied to pasted values only; manual entries are always read in chart units.

Technical Architecture: Triple-Source Expected Move Pipeline

  1. Versioned Paste Decoder: One string input carries anchor, daily straddle, weekly straddle and multiplier — validated on version and field count, with every absent slot decoding to zero so it falls through to the manual entries and then to the range fallback. The info table reports whether the live values came from the paste, from manual entry, or from the automatic fallback.
  2. Straddle Conversion Engine: EM(1σ) = ATM straddle × 0.85. A straddle's price is its expected payout; under a normal approximation, roughly 85% of that payout equals the 1σ price range. The multiplier is exposed as an input — set 1.0 to use the raw straddle convention instead. A pasted line carries its own multiplier and takes precedence; when using the paste workflow, adjust the multiplier on the dashboard before copying.
  3. Volatility Mode: EM(daily) = anchor × IV × √(1/252) and EM(weekly) = anchor × IV × √(5/252), the trading-day convention. Useful when you track IV but not option prices.
  4. Automatic Fallback Cascade: Any zeroed input degrades gracefully — daily falls back to the Average Daily Range (default 14 days), weekly to the Average Weekly Range (default 8 weeks), and a missing weekly straddle first derives from the daily straddle × √5. The info table always displays which source is live, so there is never ambiguity about what the bands represent.
  5. Chart-Side Lock Engine: The script contains zero request.security calls. Anchors and bands compute from the chart's own session boundaries and lock at the day/week open — they cannot move intraday, and there is no repaint path by construction.
  6. Range Consumption Meter: Completed daily and weekly ranges feed fixed-length rolling windows; the current period's range is expressed as a percentage of its average ("today has used 78% of its average range") — the continuation/exhaustion filter the EM bands are read with.


Features & Functionality

  1. Daily Expected Move Bands: ±1σ and optional ±2σ steplines around a configurable anchor — prior close (the desk-quoting convention, default), today's open, or the spot price carried in the paste.
  2. Weekly Expected Move Bands: The identical structure anchored at the weekly boundary, off by default for chart cleanliness.
  3. Anchor Lines: Dimmed reference steplines marking the exact price the bands are centred on.
  4. Live Info Table: Effective daily and weekly EM with source labels, ADR/AWR values, day/week range-consumption percentages that highlight when a range is fully spent, and an EM Data row reporting paste / manual / fallback status.
  5. Symbol Mode: SPX / ES one-to-one, or SPY with pasted values auto-scaled ÷10 — a chart label confirms whenever scaling is active.
  6. Alert Suite: Seven conditions — daily ±1σ break, daily ±2σ break (tail move), weekly ±1σ break, and ADR exhausted (day range reaches 100% of average). All fire on confirmed closes; a crossed band cannot move away afterward.


Honest limitations: the expected move is model context, not a boundary — roughly one day in three closes outside the ±1σ band by construction, because that is what 1σ means. Straddle and IV inputs are static: re-enter them when the session rolls or the volatility regime shifts. ADR/AWR use chart-session ranges, which on continuous futures include the overnight session — usually what you want on full-Globex instruments, but know your convention.

Open-source under CC BY-NC-SA 4.0. Educational tool — not financial advice.

免責事項

これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。