teaceo-debug/DEEP6 / .claude/skills/nt8-backtesting-expert
nt8-backtesting-expert
UnverifiedNT8 Backtesting Expert Skill
Invoke this skill when the user wants to:
- Run a backtest in NinjaTrader 8 Strategy Analyzer
- Download or import historical data for backtesting
- Optimize strategy parameters (exhaustive, genetic, walk-forward)
- Debug why backtest results differ from live trading
- Write NinjaScript strategy code that backtests accurately
- Understand Strategy Analyzer settings, metrics, or output
- Set up multi-timeframe or multi-instrument backtests
- Improve backtest fill accuracy (Tick Replay, OrderFillResolution)
- Export or interpret backtest performance results
- Build optimization-ready strategies with proper parameter exposure
Entry Point
- Load
knowledge.mdin this directory first. - Classify the task as one of:
- data acquisition — downloading, importing, or verifying historical data
- strategy analyzer operation — running backtests, optimization, walk-forward
- code correctness — writing or debugging NinjaScript for accurate backtesting
- results interpretation — reading metrics, diagnosing discrepancies, exporting
- fill accuracy — Tick Replay, OrderFillResolution, intrabar granularity
- Route to the matching section of
knowledge.md.
Invariants
- Never assume data is present. Always verify data exists for the requested instrument, date range, and bar type before running any backtest.
- Distinguish Tick Replay (intra-bar indicator updates) from OrderFillResolution (intra-bar order fills). They cannot be used together.
- Distinguish Market Replay (playback .nrd files with Level II) from Historical Data (OHLC bars). They are different data pipelines.
- Treat
Calculate.OnBarCloseas the safe default for backtesting. Only useOnEachTickwith Tick Replay enabled. - Set
BarsRequiredToTrade>= the longest indicator period in the strategy. Failure to do this is the #1 cause of invalid backtest results. - Set realistic slippage (2-5 ticks for NQ) and commission before trusting any profit figure.
- Never trust optimization results without Walk-Forward validation or out-of-sample testing.
- If backtest shows >90% win rate or >5.0 profit factor on a meaningful sample, suspect overfitting before celebrating.
Scope Boundaries
| Task | Owner |
|---|---|
| Downloading Market Replay .nrd files | nt8-playback-operator (for download workflow), this skill (for understanding what to download) |
| Playback UI control (play/pause/step) | nt8-playback-operator |
| Strategy code compilation errors | nt8-fix or nt8-build-verify |
| Strategy enablement on live chart | nt8-strategy-operations |
| Chart visual verification after backtest | nt8-chart-verification |
| Python-side backtest/replay research | DEEP6 Python replay/backtest stack |
| Writing new NinjaScript from scratch | nt8-new (for generation), this skill (for backtest-correct patterns) |
| Platform installation or corruption | nt8-install-repair |
OpenCode Skills (Universal NT8 Knowledge)
Use when broader platform/NinjaScript knowledge is needed:
ninjatrader-builder-doctor— NinjaScript development patternsninjatrader-machine-profile— NT8 platform, state machine, namespacesninjatrader-error-doctor— Compile errors, runtime exceptions
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |