Skip to content

teaceo-debug/DEEP6 / .claude/skills/nt8-backtesting-expert

nt8-backtesting-expert

Unverified

NT8 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

  1. Load knowledge.md in this directory first.
  2. 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
  3. 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.OnBarClose as the safe default for backtesting. Only use OnEachTick with 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

TaskOwner
Downloading Market Replay .nrd filesnt8-playback-operator (for download workflow), this skill (for understanding what to download)
Playback UI control (play/pause/step)nt8-playback-operator
Strategy code compilation errorsnt8-fix or nt8-build-verify
Strategy enablement on live chartnt8-strategy-operations
Chart visual verification after backtestnt8-chart-verification
Python-side backtest/replay researchDEEP6 Python replay/backtest stack
Writing new NinjaScript from scratchnt8-new (for generation), this skill (for backtest-correct patterns)
Platform installation or corruptionnt8-install-repair

OpenCode Skills (Universal NT8 Knowledge)

Use when broader platform/NinjaScript knowledge is needed:

  • ninjatrader-builder-doctor — NinjaScript development patterns
  • ninjatrader-machine-profile — NT8 platform, state machine, namespaces
  • ninjatrader-error-doctor — Compile errors, runtime exceptions
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: 196kUpdated Claude CodeCodexVerifiedInstall
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: 192kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 192kUpdated Claude CodeCodexVerifiedInstall
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: 192kUpdated Claude CodeCodexVerifiedInstall