9.3 KiB
Quick Start: Deploy to NinjaTrader 8
Status: Phases A, B, C Complete ✅
Ready For: Immediate NT8 Deployment
Estimated Time: 30 minutes to first strategy running
🚀 5-Step Quick Start
Step 1: Deploy to NT8 (2 minutes)
Open PowerShell and run:
cd C:\dev\nt8-sdk
.\deployment\Deploy-To-NT8.ps1
What This Does:
- Builds SDK in Release mode
- Runs all 319 tests (should pass)
- Copies NT8.Core.dll to NinjaTrader
- Copies 3 strategy files to NT8
- Verifies deployment
Expected Output:
[1/6] Building SDK...
✓ Build succeeded
[2/6] Running tests...
✓ All tests passed (319 tests)
[3/6] Copying SDK DLLs...
✓ Copied NT8.Core.dll
✓ Copied NT8.Core.pdb
[4/6] Copying dependencies...
✓ Copied dependencies
[5/6] Copying strategy files...
✓ Copied NT8StrategyBase.cs
✓ Copied SimpleORBNT8.cs
✓ Copied MinimalTestStrategy.cs
[6/6] Verifying deployment...
✓ Deployment verified
✓ Deployment succeeded!
Step 2: Compile in NinjaTrader 8 (2 minutes)
-
Open NinjaTrader 8
-
Open NinjaScript Editor:
- Press
F5OR - Tools → NinjaScript Editor
- Press
-
Compile All:
- Press
F5OR - Compile → Compile All
- Press
-
Verify Success:
- Look for "Compilation successful" message
- Check Output window for zero errors
If Compilation Fails:
- Check NinjaTrader version (need 8.0.20.1+)
- Verify .NET Framework 4.8 installed
- Review error messages in Output window
- See troubleshooting section below
Step 3: Test MinimalTestStrategy (5 minutes)
Purpose: Verify basic NT8 integration works
-
Create New Strategy Instance:
- File → New → Strategy
- OR Right-click chart → Strategies
-
Select Strategy:
- Find "Minimal Test" in dropdown
- Click it
-
Configure:
- Instrument: ES 03-26 (or current contract)
- Data Series: 5 Minute
- Calculate: OnBarClose (default)
- From: 1 hour ago
- To: Now
-
Apply:
- Click "Apply" button
- Then click "OK"
-
Monitor Output Window:
- View → Output
- Look for:
[MinimalTest] Strategy initialized [MinimalTest] Bar 10: 09:35:00 O=4200.00 H=4205.00 L=4198.00 C=4203.00 V=10000 [MinimalTest] Bar 20: 09:45:00 O=4203.00 H=4208.00 L=4201.00 C=4206.00 V=12000
-
Let Run for 10 minutes
- Should see periodic bar logs
- No errors in Log tab
Success: If you see bars logging, basic integration is working! ✅
Step 4: Test SimpleORBNT8 - Historical Data (10 minutes)
Purpose: Verify full SDK integration works
-
Load Historical Data:
- Create new ES 5-minute chart
- Load 2 days of data (Data Series → Days to load: 2)
-
Add SimpleORBNT8 Strategy:
- Right-click chart → Strategies
- Add "Simple ORB NT8"
-
Configure Parameters:
Strategy Settings: - Opening Range Minutes: 30 - Std Dev Multiplier: 1.0 Risk Settings: - Stop Ticks: 8 - Target Ticks: 16 - Daily Loss Limit: 1000 - Max Trade Risk: 200 - Max Positions: 1 Sizing Settings: - Risk Per Trade: 100 - Min Contracts: 1 - Max Contracts: 3 SDK Settings: - Enable SDK: ☑ (checked) -
Enable Strategy:
- Check "Enabled" box
- Click "OK"
-
Watch Output Window:
[SDK] Simple ORB NT8 initialized successfully [SDK] SDK initialization complete [SDK] Submitting: Buy 1 ES [SDK] Filled: SDK_ES_... @ 4203.50 -
Verify on Chart:
- Should see entry markers
- Stop loss lines
- Target lines
- Position indicators
Success: If SDK initializes and strategy generates trades, full integration works! ✅
Step 5: Test SimpleORBNT8 - Simulation Account (10+ minutes)
Purpose: Verify live order submission works
-
Connect to Simulation:
- Tools → Connections
- Select "Kinetick - End Of Day (free)" OR your data provider
- Click "Connect"
- Verify "Connected" status
-
Create New Chart:
- File → New → Chart
- Instrument: ES (current contract)
- Type: 5 Minute
-
Add SimpleORBNT8:
- Right-click chart → Strategies
- Add "Simple ORB NT8"
- Use same parameters as Step 4
-
Enable for Realtime:
- Check "Enabled"
- Calculate: On bar close
- Click "OK"
-
Monitor Live:
- Watch for opening range calculation (first 30 minutes)
- Look for trade signals
- Verify orders appear in "Strategies" tab
- Check "Orders" tab for fills
-
Validate:
- SDK initializes without errors
- Opening range calculates correctly
- Strategy generates intents when appropriate
- Orders submit to simulation account
- Stops and targets placed correctly
- No exceptions in Output window
Success: If orders submit and fill in simulation, ready for extended testing! ✅
✅ Validation Checklist
After completing all 5 steps:
- Deploy-To-NT8.ps1 ran successfully
- NT8 compiled with zero errors
- MinimalTestStrategy ran and logged bars
- SimpleORBNT8 initialized SDK components
- SimpleORBNT8 generated trading intents
- SimpleORBNT8 submitted orders to simulation
- Orders filled correctly
- Stops/targets placed correctly
- No crashes or exceptions
If all checked: Ready for extended simulation testing! 🎉
🚨 Troubleshooting
Issue: Deployment Script Fails
Error: "Build failed"
# Try manual build
cd C:\dev\nt8-sdk
dotnet build --configuration Release
# Check for errors
# Fix any compilation issues
# Re-run Deploy-To-NT8.ps1
Error: "Tests failed"
# Run tests separately to see failures
dotnet test --configuration Release
# Review failed tests
# Fix issues
# Re-run deployment
Error: "NT8 Custom directory not found"
- Verify NinjaTrader 8 is installed
- Check path:
%USERPROFILE%\Documents\NinjaTrader 8\bin\Custom - If different location, edit
Deploy-To-NT8.ps1$nt8Custom variable
Issue: NT8 Compilation Errors
Error: "Could not load file or assembly 'NT8.Core'"
- Solution: Re-run
Deploy-To-NT8.ps1 - Verify NT8.Core.dll exists in
Documents\NinjaTrader 8\bin\Custom\
Error: "Type or namespace 'NinjaTrader' could not be found"
- Solution: NT8 version too old, need 8.0.20.1+
- Update NinjaTrader 8
- Try compilation again
Error: "The type or namespace name 'IStrategy' could not be found"
- Solution: NT8.Core.dll not found by compiler
- Close NT8 completely
- Re-run
Deploy-To-NT8.ps1 - Re-open NT8 and compile
Issue: Strategy Won't Enable
Error: "Strategy initialization failed"
- Check Output window for specific error
- Common causes:
- Invalid parameters (e.g., StopTicks = 0)
- Insufficient data (need BarsRequiredToTrade)
- Account issues (simulation not connected)
Error: "SDK initialization failed"
- Check Log tab for exception details
- Verify NT8.Core.dll is correct version
- Try MinimalTestStrategy first (no SDK dependencies)
Issue: No Trade Signals Generated
Possible Causes:
-
Opening range not complete yet
- Solution: Wait 30 minutes after session start
-
No breakout conditions met
- Solution: Normal, strategy is selective
-
Risk manager rejecting all trades
- Check Output window for rejection messages
- Verify daily loss limit not already hit
- Check position limits
-
Wrong session time
- Verify strategy running during RTH (9:30-16:00 ET)
- Check time zone settings
📞 Getting Help
If Issues Persist:
-
Check Log Files:
Documents\NinjaTrader 8\log\[date]\Log.txt- Look for exceptions or errors
-
Review Output Window:
- Copy error messages
- Note exact sequence of events
-
Verify Deployment:
.\deployment\Verify-Deployment.ps1 -Detailed -
Check Test Results:
dotnet test NT8-SDK.sln --configuration Release -
Consult Documentation:
PHASES_ABC_COMPLETION_REPORT.mdPOST_INTEGRATION_ROADMAP.mdTROUBLESHOOTING.md(if exists)
🎯 Next Steps After Quick Start
If All Steps Successful:
Proceed to extended testing per POST_INTEGRATION_ROADMAP.md:
-
Week 1-2: Extended simulation validation
- Run SimpleORBNT8 continuously for 1 week
- Monitor for stability, errors, edge cases
- Collect performance data
-
Week 3-4: Production hardening
- Add monitoring/alerting
- Implement configuration management
- Add error recovery mechanisms
-
Week 5: Production readiness validation
- Complete pre-production checklist
- Final testing and validation
-
Week 6-9: Gradual production rollout
- Start with micro positions
- Scale gradually
- Build confidence with real money
Full details in: POST_INTEGRATION_ROADMAP.md
✅ Success!
If you've completed all 5 steps successfully:
You now have:
- ✅ Complete NT8 integration working
- ✅ Strategy running in NinjaTrader 8
- ✅ Orders submitting to simulation
- ✅ All SDK components operational
- ✅ Ready for extended testing
Congratulations! The hard part is done. 🎉
Next: Focus on validation, monitoring, and gradual deployment to build confidence for production trading.
Time to First Strategy Running: 30 minutes ⚡
Project Completion: 95% ✅
Ready For: Extended Simulation Testing 🚀