NinjaScript

NinjaTrader (NinjaScript) Development

Custom NinjaScript programming for production trading — strategies, indicators, optimization, backtesting, and live-deployment support. We deliver NinjaTrader-ready systems with readable NinjaScript code and deployment guidance.

NinjaTrader

What we do

The most common NinjaTrader projects clients bring us — from one-hour fixes to complete systems.

Strategy design & implementation

NinjaScript strategies: entries/exits, money management, position sizing and trade filters.

Modular NinjaScript components

Reusable classes and helper libraries for maintainability.

Custom indicators & drawing tools

Paint bars, on-chart instruments and multi-timeframe studies.

Backtesting & optimization

Robust historical testing, optimization sweeps and walk-forward validation in the Strategy Analyzer.

Code review & performance tuning

Remove repainting logic and optimize data access and OnBarUpdate performance.

AI-generated code hardening

Review and harden AI-written NinjaScript: fix OnBarUpdate logic, repainting and order management, add risk controls, and deliver tested, deployable code.

Broker & execution readiness

SIM/live checks, order-type handling and slippage/fill validation.

Ongoing support & maintenance

Hourly support or retainer plans for updates, bug fixes and adapting strategies as market structure changes.

NDAs available on request.

What NinjaScript looks like

A simple demonstration of a moving-average crossover. Production projects add documentation, input validation and a change log.

MACrossAlert.cs — NinjaScript
namespace NinjaTrader.NinjaScript.Indicators
{
    public class MACrossAlert : Indicator
    {
        private SMA fastMA;
        private SMA slowMA;

        protected override void OnStateChange()
        {
            if (State == State.SetDefaults)
            {
                Name = "MACrossAlert";
                Calculate = Calculate.OnBarClose;
                IsOverlay = true;
                FastLength = 10;
                SlowLength = 50;
            }
            else if (State == State.Configure)
            {
                fastMA = SMA(FastLength);
                slowMA = SMA(SlowLength);
            }
        }

        protected override void OnBarUpdate()
        {
            if (CurrentBar < Math.Max(FastLength, SlowLength))
                return;

            if (CrossAbove(fastMA, slowMA, 1))
                Alert("maCross", Priority.High, "Fast MA crossed above the slow MA",
                      "Alert2.wav", 10, Brushes.DimGray, Brushes.White);
        }

        [NinjaScriptProperty]
        [Display(Name = "Fast Length", Order = 1, GroupName = "Parameters")]
        public int FastLength { get; set; }

        [NinjaScriptProperty]
        [Display(Name = "Slow Length", Order = 2, GroupName = "Parameters")]
        public int SlowLength { get; set; }
    }
}

Why our NinjaTrader work stands out

  • NinjaScript developers with hands-on trading experience.
  • Production reliability focus — defensive coding, robust error handling and clear versioning.
  • Configurable risk controls — position sizing, stop logic and real-world order management available on request.
  • Trader-focused deliverables — readable source code, clear setup guides and reproducible backtest reports.

Typical engagement

  1. Intake & objectives

    We hold an intake meeting to define instruments, timeframe and risk limits, and review any sample data or scripts you provide.

  2. Functional spec & estimate

    You receive a written scope with deliverables, milestones and an estimated range of hours, plus checkpoints and transparent time tracking.

  3. Development & review

    We implement the agreed specification in NinjaScript and walk you through the results for approval.

  4. Validation (optional; recommended for strategies)

    We run in-sample / out-of-sample backtests, walk-forward tests and sensitivity analysis.

  5. Handover

    You receive the final NinjaScript source code, documentation and test results.

  6. Deployment support (optional)

    We assist with broker checks, paper-trading runs and go-live readiness, with the option of ongoing support.

Projects are billed hourly; estimates follow scoping. We notify you upfront if work is likely to exceed the initial estimate.

Deliverables you receive

  • NinjaScript source code with inline comments — stress-tested and validated in-house.
  • Deployment & user guide (PDF): input descriptions, setup instructions, NinjaTrader version notes, and data-feed/broker settings.
  • Backtest report (optional): equity curve, drawdown, trade stats and a brief plain-English interpretation.
  • Walk-forward summaries where applicable.
  • Versioned release and change log.

Case studies

Anonymized examples of NinjaTrader projects we have delivered.

Price-action swing detection with SharpDX rendering

Low-latency swing markers & GPU-accelerated charts

Prop trading firm Development effort ≈50 hours

Problem
Traders lacked reliable, low-latency detection of multi-timeframe price swings and visually consistent rendering on high-refresh, high-resolution displays, causing missed signals and slower entries.
Solution
A multi-timeframe pivot engine with ATR-based filtering and strength presets, plus a custom SharpDX renderer that offloads drawing to the GPU for consistent, high-fidelity markers at high refresh rates. Per-instrument/timeframe sensitivity controls and multiple strength presets let traders tune detection without code changes.
Outcome
Configurable, low-latency swing markers and GPU-accelerated rendering that improves chart responsiveness and visual clarity during fast markets.
Deliverables
Source code, user guide.
Dark NinjaTrader chart where green and red swing lines zigzag between pivot highs and lows, each pivot annotated with price, swing size and timing statistics, over candles and a grey volume-at-price profile.

Automated order-flow strategy with easy manual intervention

Hybrid algo with one-click manual controls

CTA / hedge-fund desk Development effort ≈100 hours

Problem
Following signals manually was too slow and error-prone in fast markets; traders needed to intervene in a running algo — to skip trades or manage positions — without disabling the system.
Solution
An automated, order-flow-driven execution strategy with an easy manual-intervention workflow (soft-exit, manual-override, takeover-safe mode). Chart-mounted buttons let traders skip, scale, or take over individual orders with one click while maintaining real-time position alignment.
Outcome
Preserves automated execution while enabling on-demand manual control, with clearer conflict resolution and a recorded execution state for predictable operations.
Deliverables
Order-flow tracker, execution manager, order logger, user guide.

Custom volume-profile indicator

Price-action VA/POC with SharpDX rendering

Prop trader Development effort ≈25 hours

Problem
Manual profile drawing distracted the trader.
Solution
A price-action, swing-based volume-profile indicator that auto-generates VA/POC and uses SharpDX rendering.
Outcome
Automated VA/POC generation and consistent visual presentation.
Deliverables
Volume-profile indicator, user guide.

Custom bar type

Trader-defined microstructure bars

Short-term futures trader Development effort ≈20 hours

Problem
Standard time/tick/volume bars masked microstructure patterns and hindered analysis.
Solution
A NinjaTrader custom bar type implementing trader-defined formation rules to expose microstructure.
Outcome
Consistent microstructure bar formation for clearer pattern visualization.
Deliverables
Bar-type code, user guide.

Mean-reversion scalping strategy

Trend-filtered intraday scalper

Independent trader Development effort ≈15 hours

Problem
Manual backtesting and cross-market execution were time-intensive and error-prone.
Solution
A mean-reversion scalper that establishes the trend with rule-based filters and trades reversions in its direction.
Outcome
Automated intraday scalps with configurable risk controls.
Deliverables
Strategy code, deployment guide, sample workspace.

Automated gap monitoring with SharpDX markers

Persistent gap tracking & exportable logs

Retail trader Development effort ≈10 hours

Problem
Manual gap tracking was impractical and error-prone.
Solution
An automated gap detector with persistent SharpDX markers and an exportable gap-fill log.
Outcome
Automated gap marking and an exportable gap-fill log for session prep.
Deliverables
Gap-monitor indicator, exportable gap log, user guide.

Pricing guide

Indicative ranges. Every project is quoted after scoping.

Indicators / drawing tools

$500 – $1,200

Single strategy (spec, backtest, deployment guide)

$1,200 – $4,000

Complex portfolio systems / custom Chart Trader

$4,000+ (custom quote)

Projects are billed hourly. A final quote follows scoping and review of any existing code. Retainer and ongoing-support options are available and priced in proposals.

Frequently asked questions

What are typical timelines?

Simple indicators — days; strategies — 1–3 weeks; complex systems — 4–10+ weeks.

Can you work with existing code?

Yes. We routinely take over, rescue and improve NinjaScript projects: diagnose issues, fix bugs, refactor for clarity and speed, extend functionality, and deliver tested, deployable code.

Can you fix code I generated with ChatGPT, Claude or another AI?

Yes — and you’re in good company; it’s one of our most common requests. AI tools are a quick way to prototype an idea, but the generated NinjaScript is often unsafe to trade as-is: typical issues include repainting, look-ahead bias that flatters backtests, fragile order handling and missing risk controls. We review the code against the rules you intended, fix what’s broken, harden it for live conditions and validate the result with proper testing. Send us the code and a short description of what it should do, and we’ll take it from there.

Which NinjaTrader versions do you support?

We develop for current desktop builds and note version-specific caveats in deliverables.

Do I receive the source code?

Yes. Every project is delivered as documented, readable source code — not a compiled black box — together with usage instructions.

Do you guarantee profits?

No. You get reproducible testing, documented assumptions and deployment best practices — but no performance guarantees.

Is an NDA available?

Yes — available on request. Independent of any NDA, nothing you share is disclosed to a third party without your prior written consent.

Technical notes & best practices

  • Every delivery includes a PDF manual covering inputs, settings, usage and deployment steps, alongside inline code comments and a change log.
  • Backtests include reproducible scripts and data-range notes for independent verification.
  • Strategy code is written to prevent repainting and look-ahead bias, handle bar replay correctly, and document intrabar execution caveats.
  • Strategies make the calculation mode explicit — Calculate.OnBarClose vs. OnEachTick — to prevent unintended intrabar behavior.
  • SharpDX rendering caches and disposes GPU resources correctly, keeping charts responsive during fast markets.
  • Strategies are validated in the Strategy Analyzer and in Playback against recorded data before SIM or live runs.

Ready to turn your idea into working NinjaTrader code?

Book a free 15-minute consultation to discuss scope, timeline and pricing. We respond within one business day — often the same day.