/ninjatrader:contract-intelfrom NinjaTrader
Resolves bare futures product codes (ES, NQ, CL) to tradeable front-month contracts by open-interest rank, classifies rollover status, and identifies full↔micro product-family siblings.
Ships in NinjaTrader. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
This skill turns a user's bare product code ("ES") into the actual tradeable contract. It flags rollover risk. It surfaces the full-vs-micro sibling when relevant. This skill does not resolve symbols server-side, for two reasons. The per-maturity OI query costs the same either place. Also, the skill gains more narrative flexibility this way.
This covers symbol and market data only, with no account binding. A sibling skill's account resolution might already fix a session to demo (simulation) or live. If so, stay on that same MCP server for consistency.
Tool names below are bare. The NinjaTrader MCP server provides them. Your client adds its own prefix. See AGENTS.md at the repo root.
market_snapshot — resolve the front-month contract and its
rollover status from a bare product code. Prune with
fields=["snapshots[].symbol","snapshots[].expirationDate","snapshots[].totalVolume","snapshots[].openInterest","snapshots[].lastPrice"].search_contracts — look up the full/micro sibling for a product.
Call it with includeFamilySiblings=true.When the user says "buy ES" or asks "what's NQ doing?", resolve the bare product code to a specific contract. Do this before any other tool call. Save the tool result to a file. Pass its path with --file. Never re-type or inline a large JSON payload in the command.
market_snapshot(
product="ES",
fields=["snapshots[].symbol","snapshots[].expirationDate","snapshots[].totalVolume","snapshots[].openInterest","snapshots[].lastPrice"]
)
# Save that response to market_snapshot.json, then:
python3 scripts/resolve.py --file market_snapshot.json
market_snapshot with product returns every non-expired maturity. Prune the response to the five fields that the resolve and rollover scripts read. resolve.py returns:
front_month — the contract with the highest OI among the nearest
two maturities. This handles mid-rollover, when the next maturity
overtakes the nearest.next_month — the maturity immediately after frontoi_ratio — front OI / next OIrolled_already — true if the second-nearest maturity has more OI
than the nearestUse front_month.symbol for any follow-up tool call (place_order, market_history, etc.).
When the user asks "is ES about to roll?" or "should I switch contracts?", run rollover.py on the same input:
market_snapshot(
product="ES",
fields=["snapshots[].symbol","snapshots[].expirationDate","snapshots[].totalVolume","snapshots[].openInterest","snapshots[].lastPrice"]
)
# Run rollover.py on the same saved response:
python3 scripts/rollover.py --file market_snapshot.json
Returns a status classification. The script applies these rules in order, and the first match wins:
rolled — next OI > front OI, at any day count. Trade the next
contract.imminent — 5 days or fewer to expiry, at any open interest.
Proximity overrides open interest here. Tell the user to roll the
position or to close it before expiration.not_imminent — days > 15 AND the next month cannot absorb a roll.
Either the next month holds no open interest, or the front holds more
than 5x it. No action needed.imminent — 5 to 15 days out AND next OI is 50% of front OI or more.
Rollover happens now. Execution runs thinner than usual.approaching — every other case. Prefer the front contract. Watch
for rollover in a few days.Also emits a ready-to-narrate narrative string and a calendar_spread_candidate flag. This flag is true when both legs have liquidity. The OI ratio is then between 0.3 and 3, during approaching or imminent status.
When the user asks "is there a micro of ES?" or "ES vs MES?" — call search_contracts with the includeFamilySiblings field. That field adds each hit's full/micro counterpart to the result:
search_contracts(text="ES", includeFamilySiblings=true)
Each result's familySibling field (when present) gives the counterpart's product name, description, isMicro flag, and valuePerPoint. Narrate the contrast directly. No script needed.
The product family might not appear in the search results. If so, load references/product-glossary.md for the common-pairs table and margin intuition.
When the user asks about Kalshi markets — read the kalshi-events MCP resource, not search_contracts. Read it by its URI, through whatever resource-read action your client provides:
tradovate://kalshi-events
Event contracts resolve to a single date (no rollover) and live in the separate tradovate://kalshi-events resource. Detect a Kalshi entry by that resource URI, not by a productType value. See references/product-glossary.md § Event contracts for more.
Always quote the exact contract symbol — never invent. ESU6, not ES or @ES. Pulled from market_snapshot.symbol or search_contracts.symbol.
When narrating rollover:
When narrating full vs micro:
correlation-hedge: contract-intel handles same-underlying
alternatives (ESU6 vs MES, ES front vs next month). Cross-underlying
pairs like ES/NQ — how correlated, how to hedge one with another —
live in correlation-hedge.pretrade-risk: this skill resolves the symbol. Pretrade-risk
sizes the trade on that symbol. Always run resolve first.search_contracts directly: if the user already named a specific
contract (ESU6, not "ES"), skip this skill. Go straight to the
target tool. This skill is for disambiguation from bare product
codes.ESU6 trades. ES does not. Never
accept a bare code from the LLM as a tradeable symbol without
running it through resolve.py first.market_snapshot.expirationDate.rolled_already in resolve.py differs from status = "rolled"
in rollover.py. The first is a fact about the two nearest
maturities. The second is a classification that also weighs OI
ratio and days.scripts/resolve.py — bare product code → front-month resolution
(input: market_snapshot(product=...) response)scripts/rollover.py — rollover-status classification + narrative
(same input)scripts/fixtures/ — three synthetic ES snapshots covering
not_imminent, imminent, and rolled states for regression testingreferences/product-glossary.md — full/micro pairs, tick intuition,
settlement types, rollover conventions. Load it when you narrate a
cross-product contrast, or when market_snapshot does not provide
the needed contextWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub nt-ninjatrader/mcp-skills --plugin ninjatrader13 skills in this plugin
/alerts-composerTranslates natural-language alert intent into a validated Tradovate alert-DSL expression. Submits the expression via create_alert.expression. Covers 37 numeric functions across Account (netLiq, dollarOpenPL, dailyLossLimit, ...) and Contract (lastPrice, percentChange, settlementPrice, ...) entities. Also covers Position (netPos, posOpenPLUsd, posInitMarginUsd, ...) and Currency (currentRate) entities. Supports arithmetic (plus, minus, times, divide, parens), comparison (gt, gte, lt, lte, eq, neq), and top-level AND/OR/XOR logic. Validates the expression offline (subject syntax, function catalog, paren balance, flat-logic rule) before submission. Use when the user says "alert", "notify", "notify me", "watch for", "wake me when", "tell me when", "heads up when", "ping me if", "set a trigger", or "let me know if". Also use when the user asks about a sibling skill's proposed alert expression. position-watchdog, event-watch, and pretrade-risk also submit their proposed expressions through this skill./chart-renderThis skill renders three static PNG charts, with Matplotlib. Candlestick charts, with VWAP, fill-marker, and price-level overlays. Horizontal volume-profile histograms, with POC, VAH, and VAL lines. Cumulative-P&L equity curves, with optional drawdown shading. Chart data comes from market_history bars, fill_history fills, market-context analytics, and trade-journal round-trip trades. Use it when the user asks to "chart", "plot", "draw", "visualize", or "render". Also use it when the user wants a picture of the bars, fills, equity, or profile. Also use it for a qualified "show", such as "show the chart", "show me the bars", or "show my equity curve". A bare "show me my positions" is NOT a chart request. Route it to position-watchdog or my_portfolio. It produces PNG output at a specified path. It is never interactive. This skill requires matplotlib (install with `pip install matplotlib`)./correlation-hedgeCompute historical Pearson correlation and OLS regression beta between two futures symbols, on log-returns. Turn that result into a dollar-neutral hedge proposal for an open position. Covers cross-underlying relationships — ES vs NQ, CL vs NG, GC vs SI, bonds vs stocks, and currencies vs DX. For same-underlying siblings like ES/MES, use contract-intel instead. Produces sized hedge candidates with raw qty, rounded qty, residual exposure percentage, and coverage percentage. Always informational — never emits order payloads. Use when the user asks about "correlation between X and Y", "hedge this", "how do I hedge", "what could I short to offset", "beta", "X vs Y correlation", "cross-asset", "co-move", "correlated exposure", or "am I already long the market"./event-watchCovers a high-volatility economic event calendar — FOMC, CPI, NFP, EIA, and OPEC. Also covers earnings-season awareness and session-boundary context — globex open, NY cash open, settlement, and EIA release windows. Reports upcoming events and filters them by the user's current positions. Explains a move after it happens (for example, "ES +24pts in 8min matches the hot CPI print"). Computes historical reaction-size magnitudes from prior releases. Proposes reaction-window bracket alerts via alerts-composer. It is strictly reactive, with no timer-based push. Use when the user asks "what's coming up", "economic calendar", "why did it move", "NY cash open", or "session open". Also use when the user names a specific event — CPI, FOMC, NFP, EIA, OPEC, or earnings./market-contextComputes market metrics for futures from market_history output. Metrics include session VWAP, POC/VAH/VAL (value area), bar-level delta, cumulative delta, order-flow imbalance, ATR(N), realized volatility, and cross-symbol relative strength. It produces narrative summaries of market structure and the volatility regime. Use when the user asks about VWAP, POC, market profile, or value area. Also use for ATR, realized volatility, delta, cumulative delta, or order-flow imbalance. Also use for the volatility regime, or for intra-day relative strength between related symbols (e.g., ES vs NQ vs RTY). position-watchdog, pretrade-risk, scale-manager, chart-render, trade-replay, and trade-debrief consume this skill's output as input./position-watchdogReports the live health of open futures positions. Output covers open P&L in dollars and R, and distance to stop (ticks, dollars, % of the daily loss budget). It also covers R-achieved to target, time in trade, and margin utilization. It also lists guardrail flags (no stop attached, a stop moved against entry, correlated index exposure). It also gives informational what-if math — move stop, extend target, go breakeven. It also detects stop drift from order history. A trailed stop means less risk. A widened stop means more risk. Use when the user asks "how am I doing", "what's my P&L", "how much am I up", "am I up or down", "position health", "my positions", "where's my stop", or "how close to stop". Also use when the user asks "am I in trouble", "daily loss", "margin usage", "am I safe", "what if I move my stop to X", "what if I extend target", "should I go breakeven", or "has my stop been moved". For closed-position analysis use trade-replay. For exact order payloads to execute, use scale-manager.Other plugins' skills for the same job