/ninjatrader:chart-renderfrom NinjaTrader
Renders static PNG charts with Matplotlib: candlestick with VWAP/fill overlays, volume profile with POC/VAH/VAL, and equity curves with drawdown shading. Activated by chart/plot/draw/visualize requests.
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.
Pattern questions ("is this a breakout?", "what did the profile look like?", "am I up for the week?") get visual answers. Three static PNG renderings: candles, volume profile, equity curve. Data in JSON on stdin, path on --output, PNG on disk.
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.
matplotlib (install: pip install matplotlib) — the only
external dependency in the skill. Each script detects its absence
and errors cleanly (exit code 3), with install instructions.matplotlib in a PEP 723 metadata block, so
uv run <script> installs the dependency for you.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 — bars for candles, profile
histogramfill_history — fills for marker overlay on
candles, or round-trips for the equity curvemarket-context for VWAP series, POC/VAH/VAL, ATR bands (ATR bands
not yet rendered — see "Non-goals")trade-journal's streaks.py for paired trades to feed the
equity curve| User phrasing | Script |
|---|---|
| "chart ES 1-min today", "show the bars", "candles with VWAP" | candles.py |
| "volume profile", "where's the POC", "value area" | profile_chart.py |
| "equity curve", "P&L for the week", "am I up this month" | equity_curve.py |
Candles:
market_history(
symbol=..., barType="Minute", barSize=1|5,
from=<ISO-8601>, to=<ISO-8601>
)
from requires to. If you pass only one, it errors. For a "last N bars" intent, pass count= instead of a time range. The two are mutually exclusive.
Optionally also:
market-context's vwap.py output for the VWAP seriesfill_history filtered to the window for fill markerspretrade-risk or position-watchdog output for stop/target linesProfile:
market-context's profile.py — reshape to:
{"profile": [{"price": ..., "volume": ...}, ...],
"poc": ..., "vah": ..., "val": ...}
profile.py output is already in absolute prices. The bar.open + offset × tickSize reconstruction happens inside the script. Pass POC / VAH / VAL straight through. Do not apply the tick-offset conversion again. Otherwise, every horizontal line renders shifted by value × tickSize away from its correct position on the chart. The script gives no error to flag the mistake.
Equity curve:
fill_history(account=..., startDate=<YYYY-MM-DD>, endDate=<YYYY-MM-DD>)
(startDate/endDate are date-level; natural terms like "this week" also work.)
Pipe through trade-journal/scripts/streaks.py to get round-trip trades with pnl_usd.
Save the source JSON to a file. Pass its path with --file. Never re-type or inline a large JSON payload in the command.
Run each script with uv run. uv run reads the PEP 723 metadata block in the script and installs matplotlib for you.
uv run scripts/candles.py --file market_history.json --output /tmp/chart.png
uv run scripts/profile_chart.py --file profile.json --output /tmp/profile.png
uv run scripts/equity_curve.py --file trades.json --output /tmp/equity.png \
--shade-drawdown
If uv is not available, use python3 instead. Install matplotlib first.
Output path: pick /tmp/<session_id>_<name>.png by default. The rendered image travels via the transcript, so the file itself is ephemeral.
Use the Read tool on the output PNG path. It returns the image inline in the transcript. Pair it with 2-3 sentences of narrative that name what the picture shows.
candles.py{
"symbol": "ESU6",
"title": "ES 5m, 2026-04-20 13:30-14:30 UTC",
"bars": [{"timestamp": ISO, "open": ..., "high": ..., "low": ..., "close": ...}, ...],
"vwap": [{"timestamp": ISO, "value": ...}, ...],
"fills": [{"timestamp": ISO, "price": ..., "action": "Buy"|"Sell", "quantity": ...}, ...],
"levels": [{"label": "stop", "price": 7141.0, "style": "dashed"}, ...]
}
All of vwap, fills, levels are optional. bars required. fill_history's real field is quantity, not qty — this reshape target keeps that name. candles.py's fill markers do not read the field at all; it renders only timestamp, price, and action.
profile_chart.py{
"symbol": "ESU6",
"title": "ES profile, 2026-04-20 session",
"profile": [{"price": ..., "volume": ...}, ...],
"poc": 7158.0,
"vah": 7165.0,
"val": 7148.0,
"price_range": [7140, 7175]
}
POC / VAH / VAL all optional.
equity_curve.py{
"title": "Equity curve, 2026-04-15 - 2026-04-20",
"trades": [{"exit_time": ISO, "pnl_usd": ...}, ...]
}
Trades must be sorted oldest-first by exit_time.
The defaults are deliberately readable. When the user does not ask for a specific size or style, use them. See references/styling.md for palette, DPI guidance, and override patterns. Load it only when the user asks for customization.
After you render the chart, narrate what the picture shows:
"Chart saved to /tmp/es_20260420.png. Here's what stands out: VWAP acted as resistance on the 13:45 bar — the candle's wick tested 7109 (your target neighborhood) but closed back inside. That's where you got out — a reasonable exit given the VWAP rejection."
"Profile for today's session. POC printed at 7103 with 3,420 contracts — a tight value area (7100–7106). Price tested above VAH twice and rejected both times. Current 7102 is mid-value — no directional bias from the profile alone."
"Equity curve shows +$725 net over 9 trades, max drawdown $280 on Apr 17 afternoon (shaded). Streak pattern: 4 green days, no back-to-back red days — runs are short."
market-context: market-context produces numbers and text
narrative. Chart-render visualizes those numbers as PNG. Pair them
for rich answers.trade-replay: this skill draws pictures only. trade-replay
covers the numbers for ONE trade — MFE/MAE and counterfactual exits,
as text. When the user wants to SEE that trade, render its bars via
candles.py, with the entry/exit markers and stop/target levels.position-watchdog: watchdog gives the numeric state of a
live position. Chart-render visualizes its history — especially
useful when watchdog flags something unusual.market-context's delta.py
output with the fills overlay on a candle chart.market-context produces ATR as
a number, but ATR bands on candles need a per-bar ATR fetch, which
inflates the input schema. This can be added when a user asks.scripts/candles.py — candlestick rendering with optional VWAP,
fills, and horizontal price levels. Width 14, height 6, DPI 140
by default.scripts/profile_chart.py — horizontal volume histogram with POC
(solid red), VAH/VAL (dashed), and optional price-range clip.
Tall aspect (8 × 10), to read price vertically.scripts/equity_curve.py — cumulative-P&L line chart with
--shade-drawdown option. Marker on each trade close.references/styling.md — palette hexes, sizing rationale, axis
conventions, non-rendered items. Load it only to customize the
output.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
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./contract-intelSymbol discovery, front-month resolution, rollover-imminence classification, and product-family awareness (full ↔ micro pairs like ES/MES) for futures contracts. Resolves bare product codes like "ES" or "NQ" to the actual tradeable front-month contract (e.g., ESU6) by open-interest rank across maturities. Classifies rollover status as not_imminent / approaching / imminent / rolled, with calendar-spread candidate flag when both legs are liquid. Use when the user asks "what symbol", "which contract to trade", "front month", "roll" or "rollover", "micro" or "full", or "calendar spread". Also use when the user gives a bare product code (ES, NQ, YM, CL, GC, etc.) without a maturity. Also handles product-family metadata via search_contracts includeFamilySiblings flag./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