PLUMBLINE Stage I: Build
v0.1.0
NinjaScript AI Framework

Build production-grade NinjaScript prompts for AI-assisted development.

Select core rules, scale profile, domain modules, and describe your task. The tool assembles a layered, production-quality prompt — ready to paste into any LLM for NinjaTrader 8 development.

How to Use the Prompt Builder

Three easy steps to a production-ready AI prompt.

01
Choose a Preset
Pick a workflow preset — Strategy, Indicator, or Prop Firm — to auto-configure the right scale, domains, and rules.
02
Describe the Task
Write a clear description of what you want the AI to build. Be specific about entry/exit logic, conditions, parameters, and risk constraints.
03
Generate & Copy
Click Generate to assemble the structured prompt, then copy or download to paste into your AI assistant.

What Each Mode Is For

Understand the tabs in this tool.

Tab
Prompt Builder
Select core rules, a scale profile, domain modules, and describe your task. The tool assembles a layered, production-quality prompt in seconds.
Tab
Review & Troubleshoot
Pick a NinjaScript issue template — compile errors, backtest discrepancies, order fill problems — and generate a structured diagnostic prompt.
System
Core Rules
14 essential rules that govern how the AI writes NinjaScript. Always-on by default — toggle individually if you need a leaner prompt.
Disclaimer: This tool generates prompts only. It does not guarantee that any AI-generated code will be correct, complete, safe, or production-ready. Always review, test in simulation, and validate against the official NinjaTrader 8 documentation before deployment to live trading.
0
Workflow Presets
Quick-start configurations. Click to load, or customize manually below.
Strategy Builder
Small · Execution, Risk, Backtest
Indicator Builder
Micro · Indicators, Performance
Prop Firm Strategy
Medium · Execution, Risk, Session, Backtest
1
Core Rules
14 rules governing how the AI writes NinjaScript. All on by default.
Always OnCore Rules(14/14)
    2
    Scale Profile
    How large is the project? Select one.
    Micro
    Single indicator, quick utility, prototype. Inline comments only. Manual testing OK.
    ~200 tokens★ PRESET
    Small
    Single strategy with basic risk management. Test edge cases. Document assumptions.
    ~280 tokens★ PRESET
    Medium
    Multi-strategy system or strategy + custom indicators. Full docs, backtest validation, walk-forward.
    ~400 tokens★ PRESET
    Large
    Production live trading system. Prop firm compliance, full deployment checklist, DLL mgmt, alert thresholds.
    ~750 tokens★ PRESET
    3
    Domain Modules
    Select one or more NinjaScript domains relevant to your project.
    Execution & Orders
    Order submission, fill handling, position sync, named orders, slippage & commission.
    +200 tokens★ PRESET
    Risk Management
    SetStopLoss()/SetProfitTarget(), daily loss limits, max positions, trailing drawdown for prop firms.
    +200 tokens★ PRESET
    Indicators & Signals
    AddPlot()/AddLine(), CurrentBar guards, BarsRequiredToPlot/Trade, cache refs, avoid LINQ in hot path.
    +200 tokens★ PRESET
    Evaluation Standards
    Statistical review, IS/OOS discipline, expectancy validation, Monte Carlo review, external verification.
    +400 tokens★ PRESET
    Performance
    No allocations in OnBarUpdate()/OnTick(), cache Close[0], IsFirstTickOfBar gating, no blocking I/O.
    +200 tokens★ PRESET
    Session & Timing
    RTH vs 24hr, time-of-day filters, BarsInProgress for multi-series, flat-at-close logic.
    +200 tokens★ PRESET
    Multi-Timeframe
    AddDataSeries() setup, CurrentBars[] guards per series, cross-timeframe signal sync, plural accessors (Closes[1][0]), BarsInProgress routing.
    +250 tokens★ PRESET
    4
    Strategy Type
    What type of trading strategy are you building? Select one (optional).
    Mean Reversion
    Fade deviations from a statistical mean. Enter counter-trend at extremes, exit on return to equilibrium.
    ~150 tokens★ PRESET
    Trend Following
    Ride established momentum. Enter on trend confirmation, trail stops, let winners run.
    ~150 tokens★ PRESET
    Breakout
    Trade range expansions. Enter on consolidation breaks with volume confirmation, target continuation.
    ~150 tokens★ PRESET
    Scalping
    Capture small, rapid profits from micro price movements. Quick entries and exits on ultra-short timeframes.
    ~150 tokens★ PRESET
    5
    Sessions
    Select one or more trading sessions (optional).
    Asia Session
    6:00 PM – 2:00 AM ET. Tokyo & Sydney markets. Lower volatility, range-bound conditions.
    ~100 tokens★ PRESET
    London Session
    2:00 AM – 8:00 AM ET. European markets. Breakout moves as liquidity increases.
    ~100 tokens★ PRESET
    New York Session
    8:00 AM – 5:00 PM ET. US markets. Highest liquidity, major news events.
    ~100 tokens★ PRESET
    6
    Task / Request
    Describe what you want the AI to build or modify.
    0 characters
    ~0 tokens
    Generated Prompt
    Diagnostic Mode NinjaScript Troubleshooter

    Build a structured diagnostic prompt that forces the AI to follow a disciplined process — reproduce, isolate, identify, fix, verify. All 14 Core Rules are automatically included.

    0
    Issue Templates
    Quick-select a common NinjaScript issue type.
    Compile Error
    Syntax or build failures
    Backtest Discrepancy
    Unexpected results in Strategy Analyzer
    Live vs Sim Divergence
    Behavior differs between modes
    Order / Fill Issue
    Orders not filling or wrong execution
    Indicator Bug
    Wrong values, not plotting, calc errors
    Performance / Lag
    Slow execution, freezing, CPU issues
    1
    Describe the Problem
    Fields marked * are required. More detail = better diagnosis.
    PNG, JPG, GIF, or WEBP — max 5 MB. Text will be auto-extracted.
    Diagnostic Approach (auto-included in prompt)
    1. Reproduce — Recreate the issue using the steps and environment provided.
    2. Isolate — Narrow the root cause to a specific event handler or code block.
    3. Identify — Determine the exact root cause with evidence.
    4. Fix — Apply the minimal, targeted fix. Do NOT refactor unrelated code.
    5. Verify — Confirm the fix resolves the issue without regressions.
    6. Limitations — Flag anything that cannot be verified without live execution.
    ~0 tokens
    Diagnostic Prompt