/ninjatrader:trade-journalfrom NinjaTrader
Analyzes closed trades with P&L breakdowns by symbol and hour, win/loss streaks, hold-time distributions, and per-fill slippage vs arrival mid and interval VWAP. Requires NinjaTrader MCP server.
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.
Summarize what happened across closed trades. Three outputs:
This skill is descriptive only. For "what should I change", use trade-debrief.
Demo (simulation) and live are two separate MCP servers. Account names are unique to one server. Once a workflow resolves an account on a server, every downstream call must go through that same server. This includes my_portfolio, market_snapshot, place_order, create_alert, history tools, etc. Cross-routing fails or hits the wrong environment.
Tool names below are bare. The NinjaTrader MCP server provides them. Your client adds its own prefix. See AGENTS.md at the repo root.
fill_history — per-fill times, prices, and quantities.performance_summary — pre-aggregated win rate, profit factor,
and drawdown. Cross-check it against streaks.py's output.position_history — P&L, quantity, and timestamps per closed
position (aggregate view). No hold-time or MFE/MAE field — use
timeline_report/timeline_details for those.timeline_report — existing timeline annotations. Also the source
for per-trade mae/mfe/hold_minutes.market_history — arrival-window bars for slippage. Use this only
when the user asks about slippage.order_history and order_details — to find arrivalTimestamp
(order-submit time) for the slippage calculation.user_profile — discover available account names when the account
is unknown.describe — call with topic='response_format' for the compact
format="columns" output shape.Account resolution. Every history call below requires account=<name>. If the account name is not in the conversation context, call user_profile() first. Its response's accounts[].name field lists every account on this MCP server. Pass that name as account= on every later call.
fill_history(account=<acct>, startDate=<YYYY-MM-DD or "today">, endDate=<YYYY-MM-DD>)
startDate/endDate are date-level. They use YYYY-MM-DD or a natural term like "today" or "this week", never a timestamp. format="columns" cuts multi-day responses by about 40-60% on result sets over 50 fills. See describe(topic='response_format').
To get P&L in dollars, run streaks.py with a per-product value-per-point. Save the fill_history result to a file. Pass its path with --file. Never re-type or inline a large JSON payload in the command.
python3 scripts/streaks.py --file fill_history.json \
--value-per-point-map ES:50 MES:5 NQ:20 MNQ:2 CL:1000
When the day is single-product, pass --value-per-point <N> instead.
Output fields consumed downstream:
overall.trades, overall.win_rate, overall.total_pnl_usdoverall.avg_hold_minutes_winners vs avg_hold_minutes_losers —
if there is a material gap (for example, winners held twice as
long), narrate it.overall.longest_win_streak / longest_loss_streak / current_streakby_symbol — per-product breakdown for mixed sessionsby_hour_utc — time-of-day distributionOnly run this when the user names a specific fill or a small set. It is expensive: one market_history call runs per fill.
Fetch bars around the fill. Two minutes before and two minutes after is enough. This window covers the arrival mid and the interval VWAP. The arrival mid comes from the bar that contains the order-submit time. The interval VWAP defaults to ±60s around the fill:
market_history(
symbol=<sym>,
barType="Minute",
barSize=1,
from=<fill_ts - 2min, ISO-8601>,
to=<fill_ts + 2min, ISO-8601>
)
(One-minute bars are the finest time granularity. There is no 30-second bar. from requires to.)
Pair the bars with the fill, pulled from fill_history or order_details. Save the combined {"fill": {...}, "bars": [...]} object to a file.
python3 scripts/slippage.py --file fill_and_bars.json \
--tick-size 0.25 \
--vwap-window-seconds 60
Output fields:
arrival_mid — midpoint at submit timeslippage_vs_mid (price units) + slippage_ticksinterval_vwap + slippage_vs_vwapSign convention: positive = adverse. See references/tca-definitions.md.
When the user asks "how far in the money did that trade go?", pull timeline_report's trades[].mae/mfe/hold_minutes, or timeline_details's summary.mae/mfe/hold_minutes for one trade. position_history carries P&L, quantity, and timestamps for the closed position, but no MFE/MAE/hold-time field. No script runs for the aggregate view. If the user wants a bar-level replay, hand off to trade-replay.
streaks.py runs over fill_history alone. This is cheap and
always safe.slippage.py requires a per-fill market_history fetch.
On-demand only. Never batch across a day's fill list.trade-debrief: journal reports descriptive TCA facts. Debrief
proposes prescriptive coaching prompts and rule mining.trade-replay: journal summarizes many trades. Replay goes deep
on one trade, with MFE/MAE and counterfactual exits.position-watchdog: journal is retrospective, on closed trades.
Watchdog is live, on open positions.performance_summary: it pre-aggregates P&L, win rate, and
profit factor across an account's history, with different
bucketing. Prefer it for multi-month views. Use streaks.py for
same-day or same-week granularity, with an hour-of-day breakdown.trade-debrief or risk-coach.timeline_report for strategy-
level aggregation.scripts/streaks.py — FIFO round-trip pairing + overall/by-symbol/
by-hour stats from fill_history. Input via --file or stdin.scripts/slippage.py — per-fill slippage vs arrival mid + interval
VWAP. Input via --file or stdin.scripts/fixtures/ — synthetic samples:
fills_day_synthetic.json — 8 fills across ES + NQ for streaksslippage_fill_synthetic.json — 1 fill + 4 bars for slippagereferences/tca-definitions.md — slippage sign convention, round-
trip pairing rules, P&L math, streak semantics, known gaps. Load
it when you narrate a slippage sign or a round-trip pairing.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./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