Starter
$20/mo
Great for getting started.
- 2,000 credits per month
- Access to standard models
- Save checkpoints and history
- Email support
- Cancel anytime
RajaCode
AI coding assistant for NinjaTrader 8
1 using System;
2 using NinjaTrader.NinjaScript;
3 using NinjaTrader.NinjaScript.Strategies;
4 using NinjaTrader.Cbi;
5
6 namespace NinjaTrader.NinjaScript.Strategies
7 {
8 public class RajaTrendStrategy : Strategy
9 {
10 private SMA smaFast;
11 private SMA smaSlow;
12
13 protected override void OnStateChange()
14 {
15 if (State == State.SetDefaults)
16 {
17 Name = "RajaTrendStrategy";
18 Calculate = Calculate.OnBarClose;
19 EntriesPerDirection = 1;
20 IsExitOnSessionCloseStrategy = true;
21 }
22 else if (State == State.DataLoaded)
23 {
24 smaFast = SMA(20);
25 smaSlow = SMA(50);
26 }
27 }
28
29 protected override void OnBarUpdate()
30 {
31 if (CurrentBar < 50) return;
32
33 if (CrossAbove(smaFast, smaSlow, 1))
34 EnterLong("Long");
35 else if (CrossBelow(smaFast, smaSlow, 1))
36 EnterShort("Short");
37 }
38 }
39 }
$20/mo
Great for getting started.
$200/mo
Built for power users.
Unused credits roll over for 30 days. Manage or cancel anytime.
RajaCode lives inside NinjaTrader 8 so you never leave your workflow.
Describe the change you want in plain language.
RajaCode proposes precise NinjaScript edits.
One-click compile with instant feedback.
Save a checkpoint and track your history.
Refine, compile, and iterate until it is ready.
Everything you need to code, test, and deploy without leaving NinjaTrader.
Works inside NinjaTrader 8. No context switching, no copy-paste hassle.
Compile NinjaScript with real-time errors and fast iteration.
Save checkpoints, compare changes, and restore any previous version.
Simple credit system with transparent usage and easy plan management.
Standard or advanced models. RajaCode routes your prompts for the best results.
Stay current with platform and model updates delivered automatically.
Secure. Reliable. Transparent.
RajaCode combines the power of AI with the familiarity of your NinjaTrader workspace.
Your code and data stay private.
Built for traders and developers.
We follow best practices for security.
Real people, real help.
Cancel anytime. No long-term contracts.