Skip to content
v3 redesign is live — welcome to the trading cockpit.
Market updates, stock news, and futures insights — 3x/week, freeSubscribe free
Skip to content
build.logtraders.online=2,166trades.60s=74swings.ranked=308edge.latency_ms=42ms
// educational content · not financial advice

Everything on this page is published for educational and informational purposes only. Nothing here is investment, financial, legal, tax, or trading advice, a recommendation to buy or sell any security or contract, or a solicitation of any kind. Trading futures, options, equities, and crypto involves substantial risk of loss and is not suitable for every investor. Past performance — including any backtests, demos, or examples shown — does not guarantee future results. Consult a licensed professional before acting on anything you read here.

// deep dive · 02 of 06
// 02 of 06 · deep dives

NinjaTrader.

The retail futures workhorse. NinjaScript is C# inside the platform — close to native speed, full access to the order management system, and a brutally honest tick-replay backtester.

Futures · FXFree sim · ~$50/mo or one-time license liveNinjaScript (C#)Last reviewed: May 2026
// 01 · why this platform

The honest pitch.

NinjaTrader 8 is what most retail futures automators graduate to once Pine Script feels too constrained. NinjaScript is real C# — you get OnBarUpdate / OnOrderUpdate / OnExecutionUpdate event handlers, a strongly typed order ticket API, and a tick-by-tick replay mode that matches live execution closely. Real costs are the data feed (Rithmic, Kinetick, CQG, or your broker's own) and the live license; expect $150-$250/mo all-in for serious futures work. Linux is not supported.

// 02 · at a glance

Auth, orders, limits.

AuthLocal install; data feed credentials configured in Tools → Options.
Order APINative NinjaScript (C#) — Strategy / AddOn / Indicator classes.
Data feedSold separately: Kinetick (free EOD / paid live), Rithmic, CQG, Continuum, broker-provided.
SandboxSim101 paper account; Strategy Analyzer for historical; Playback for tick-level replay.
LatencyNative C#, microseconds on-machine. Network latency depends on data feed POP location.
PlatformWindows only. Use Parallels / Boot Camp on Mac.
// 03 · first runnable snippet

Hello-world, but real.

A simple SMA-cross strategy that submits market orders with attached stop and target. Note OnStateChange for setup and EnterLong/EnterShort, which automatically reverse position when called against an existing one.

C# (NinjaScript)SmaCrossStrategy.cs
1using NinjaTrader.Cbi;
2using NinjaTrader.NinjaScript.Strategies;
3 
4public class SmaCrossStrategy : Strategy
5{
6 private SMA smaFast;
7 private SMA smaSlow;
8 
9 protected override void OnStateChange()
10 {
11 if (State == State.SetDefaults)
12 {
13 Name = "SmaCrossStrategy";
14 Calculate = Calculate.OnBarClose;
15 IsExitOnSessionCloseStrategy = true;
16 ExitOnSessionCloseSeconds = 30;
17 }
18 else if (State == State.DataLoaded)
19 {
20 smaFast = SMA(9);
21 smaSlow = SMA(21);
22 AddChartIndicator(smaFast);
23 AddChartIndicator(smaSlow);
24 }
25 }
26 
27 protected override void OnBarUpdate()
28 {
29 if (CurrentBar < smaSlow.Period) return;
30 
31 SetStopLoss(CalculationMode.Ticks, 80); // 80 ticks
32 SetProfitTarget(CalculationMode.Ticks, 160); // 160 ticks (2R)
33 
34 if (CrossAbove(smaFast, smaSlow, 1)) EnterLong(1, "L");
35 else if (CrossBelow(smaFast, smaSlow, 1)) EnterShort(1, "S");
36 }
37}
// 04 · where it breaks

The traps everyone hits.

Real production failure modes. Sev1 = capital loss risk. Sev2 = data integrity / silent wrongness. Sev3 = developer ergonomics that bite later.

Sim101 ≠ live fills

Sev1

What happens. The simulator assumes you get the bid/ask without slippage on small size. Live, especially on illiquid contracts, slippage can be multiple ticks per fill.

Fix. Use the Playback connection with real tick data and a fill-resolution of 'Last' or 'Bid/Ask' before going live. Add a slippage assumption of 1-3 ticks in your strategy's R-multiple math.

OnBarUpdate fires on partial bars

Sev2

What happens. When Calculate is set to OnEachTick, OnBarUpdate runs many times per bar. Indicators based on Close will look correct on chart but be partial during the bar.

Fix. Default to Calculate=OnBarClose for systematic strategies. Only switch to OnEachTick for intra-bar exit logic that needs it (stops/targets work without this).

Strategy restarts ≠ resumed positions

Sev1

What happens. If NT8 restarts mid-trade, the strategy's internal position state may be empty even though the broker still shows the position. Subsequent EnterLong calls double up.

Fix. Use 'StartBehavior=ImmediatelySubmit', enable 'SetOrderQuantity=Strategy', and reconcile against broker positions on State.Realtime entry. Add a Sync-On-Connect check.

Data feed disconnect

Sev2

What happens. A 30-second data feed gap during a fast move can cause your strategy to miss the entry bar and trigger one bar later — at a much worse price.

Fix. Subscribe to Connection.StatusChange events and set strategy state to 'Halt' on disconnect. Re-enable manually after reviewing the gap.

Windows-only deployment

Sev3

What happens. You cannot ship NT8 to a Linux VPS. Many low-cost VPS providers don't offer Windows VMs, raising your hosting cost.

Fix. Use Contabo / Hetzner / TradingFX VPS with Windows Server. Budget $20-$60/mo for a dedicated VPS in your broker's region.

// 05 · recommended stack

What to pair it with.

No platform stands alone. These are the layers that — paired with NinjaTrader — produce production-grade automation.

LayerRecommendedWhy
Data feedRithmic (low-latency) or Kinetick (cheaper, broker-provided)Order-routing latency is dominated by the data POP, not the platform.
BrokerNinjaTrader Brokerage, Tradovate (via 8.x connector), or your existing FCMNT8 is broker-agnostic; pick the lowest commission for your contract mix.
VPSContabo / Hetzner / TradingFX with Windows Server 2022Co-locate near the exchange / data POP. NT8 cannot run on Linux.
Backtest researchStrategy Analyzer + a separate Python research notebookUse NT8 for tick-accurate backtests; use pandas for parameter studies and statistics.
// 06 · next steps

Where to read next.