/ninjatrader:market-contextfrom NinjaTrader
Computes futures market metrics from bar data: VWAP, POC/VAH/VAL, delta, order-flow imbalance, ATR, realized volatility, and cross-symbol relative strength. Produces narrative summaries of market structure and volatility regime.
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.
Compute session VWAP, POC / Value Area, ATR, realized-vol, price-vs-VWAP z-score, and cross-symbol relative strength from market_history. Produce opinionated narrative over the numbers — not raw JSON dumps.
Descriptive, not predictive. Every output describes the fetched bar window: session high, session low, and where volume clustered. It also reports the session's volatility level. Outputs do not forecast future prices or recommend trades. A user may ask about the future. An example is "will it break out?" For that kind of question, state the descriptive limit clearly in the narration. The skill can describe the conditions before past breakouts. It cannot predict the next one.
Symbol/market data only — no account binding. A sibling skill's account resolution might already pin the session to demo (simulation) or live. If so, stay on that same MCP server.
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_history — the bar data for the symbol. Set symbol, barType, barSize, and volumeProfile=true for histogram-based VWAP or market profile.market_snapshot — fallback source for tickSize when market_history doesn't carry it.search_contracts — alternate source for tickSize.Call market_history with:
symbol — the contract symbol (e.g., ESU6)barType — Minute for intraday, Daily for dailybarSize — e.g., 5 for 5-minute barsvolumeProfile: true for histogram-based VWAP or market profileFor a typical session-context read, 5-minute bars over the RTH session are a reasonable default. For volatility-regime reads, use Daily bars across a 20–60 day lookback.
histogram[].price is a tick offset from bar.open, not an absolute price. Actual price = bar.open + histogram[i].price × tickSize.
tickSize is not in the market_history response. Fetch it from one of these:
market_snapshot with the same symbolsearch_contractsFor full detail and the common-products cheat sheet, see references/histogram-offset.md.
Every script reads the market_history response as JSON and prints JSON to stdout. Save the tool result to a file and pass its path with --file. Never re-type or inline a large JSON payload into the command. You can still pipe input on stdin as a fallback.
--tick-size is contract-specific — source it from Step 2 (market_snapshot.tickSize or search_contracts.tickSize). Common values: ES/MES/NQ/MNQ 0.25, YM/MYM 1.00, ZB 0.03125, ZN 0.015625, CL/MCL 0.01, GC 0.10, SI 0.005. A hardcoded 0.25 works for ES/NQ. It silently mis-prices YM (4× too small). It also mis-prices ZB (8× too large) and CL (25× too large). Always look it up. Never paste the example value.
VWAP (chooses histogram mode if volumeProfile=true, else typical-price):
python3 scripts/vwap.py --file market_history.json --tick-size <TICK_SIZE>
Output: {vwap, mode, bars_used, total_volume, price_z_score}.
Market profile (requires volumeProfile=true):
python3 scripts/profile.py --file market_history.json --tick-size <TICK_SIZE>
Output: {poc, vah, val, value_area_pct, total_volume, levels_in_value_area, total_levels}.
The optional --value-area 0.70 is the default and matches CME convention. Lower values (e.g., 0.50) give the tighter "developing value area."
Bar delta + cumulative delta + order-flow imbalance (no histogram or tick size required — reads upVolume / downVolume from the bar):
python3 scripts/delta.py --file market_history.json
Output: {bars_used, total_up_volume, total_down_volume, net_delta, cumulative_delta_path, final_imbalance, bar_imbalance_path}. The two *_path arrays are per-bar views. Feed them to a chart-render or a pattern detector.
ATR + realized volatility + close z-score:
python3 scripts/atr.py --file market_history.json --n 14
For intraday bars, pass --periods-per-year to match the bar count per trading year, so the annualized-vol output stays meaningful. Examples:
--periods-per-year 252 (default)--periods-per-year 19656--periods-per-year 98280Cross-symbol relative strength (needs at least two symbol files):
python3 scripts/cross_symbol.py --symbol ES=es.json --symbol NQ=nq.json --symbol RTY=rty.json
Each NAME=PATH points to a saved market_history response. Output includes per-symbol change-today and pairwise spreads. This is intra-day only. Historical rolling correlation lives in correlation-hedge.
Use references/regime-narrative.md to translate the numeric output into short, opinionated sentences. Rules of thumb:
--n 14; narrate realized_vol_annualized_pct against the atr_n comparison.delta.py. Narrate net_delta and final_imbalance. Flag any bar in bar_imbalance_path with |imbalance| > 0.4 as aggressive one-sided activity.market_history calls, saved to files, then run cross_symbol.py; narrate the largest spread_pct.correlation-hedge: this skill covers intra-day relative strength (who leads today). Historical rolling correlation across a lookback window lives in correlation-hedge.chart-render: this skill produces numbers and narrative. Chart-render draws them as a PNG.trade-journal / trade-replay: those skills look at the user's own trades. market-context is market-wide — no portfolio or fill data involved.scripts/vwap.py — histogram-based VWAP with typical-price fallbackscripts/profile.py — POC / VAH / VAL (default 70% volume area)scripts/delta.py — bar delta + cumulative delta + order-flow imbalancescripts/atr.py — ATR(N), realized-vol (annualized), close z-scorescripts/cross_symbol.py — intra-day relative strength across N symbolsscripts/fixtures/ — a small synthetic market_history response for regression testingreferences/histogram-offset.md — the tick-offset convention. Load it when the user asks about histogram data or VWAP math.references/regime-narrative.md — output templates. Load it when you write narrative sentences.references/histogram-offset.md (opens in a new tab)references/regime-narrative.md (opens in a new tab)scripts/atr.py (opens in a new tab)scripts/cross_symbol.py (opens in a new tab)scripts/delta.py (opens in a new tab)scripts/fixtures/es_5min_synthetic.json (opens in a new tab)scripts/fixtures/es_cross_symbol.json (opens in a new tab)scripts/fixtures/nq_cross_symbol.json (opens in a new tab)scripts/fixtures/rty_cross_symbol.json (opens in a new tab)scripts/profile.py (opens in a new tab)scripts/vwap.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
futures, market-profile, volume-analysis, vwap, atr, order-flow
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`).Other plugins' skills for the same job