OPEN-SOURCE SCRIPT
已更新

AlgoStorm Expected Move Levels (EML)

1 797
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.
版本注释
  • Expected-move bands now mean the same thing in every mode. Implied volatility is converted to the at-the-money straddle it implies, and the average-range fallback to half the average range (the average close-to-close move of a random walk), before the multiplier is applied.
  • At the default 0.85, ±1 EM is roughly a 50% band and ±2 EM roughly 83% under a normal model, whichever source drew it. For a true ±1σ (≈68%) band, set the multiplier to 1.25.
  • Straddle and paste levels are unchanged. Implied-volatility bands are now 0.68× their previous width and average-range fallback bands 0.425×.
  • Labels, plots, the table and alerts read "EM" instead of "σ". The paste field is now titled "EM Data (Paste CSV)".
  • Inputs and saved settings are unchanged; existing alerts keep their previous names.
版本注释
  • New setting group, Futures Basis (Dashboard Spot anchor only). A pasted anchor is an SPX price, and ES and MES trade above SPX by the carry basis, tens of points when expiry is months away, so bands centred on it sat that much too low on a futures chart.
  • Auto, the default, measures chart close minus SPX close on the latest bar where both traded and applies it at each day and week open, so the bands still never move intraday. It works on any timeframe of one minute or more. Manual takes a figure in points; Off leaves the pasted anchor unchanged.
  • The Prior Close and Today's Open anchors, the default setup, are unchanged: they already come from the chart itself. In SPY mode the pasted anchor and straddles are now scaled by the measured SPY ÷ SPX ratio (about 0.0997) instead of exactly 10, locked at each day and week open; ÷10 remains when it cannot be measured.
  • The three new settings are added after the existing ones, so saved settings carry over.
版本注释
  • New Symbol Mode option, NDX / NQ, for expected-move lines in Nasdaq-100 (NDX) points. These lines start with N1 instead of 1; the straddles are used as-is, and a pasted anchor is shifted by the NQ minus NDX basis when Anchor is Dashboard Spot (pasted), measured and locked at each day and week open like the SPX basis.
  • New setting, Basis Reference (NDX), default NASDAQ:NDX, used only in NDX / NQ mode.
  • A line whose index does not match the Symbol Mode (N1 in SPX / ES or SPY mode, 1 in NDX / NQ mode) is refused with a warning naming the mode to choose, so bands are never centred on the wrong index.
  • The Prior Close and Today's Open anchors, the default setup, need no basis and are unchanged. The new option and setting are added after the existing ones, so saved settings carry over. Lines starting with 1 work exactly as before.

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。