How to import and run a NinjaScript strategy in NinjaTrader 8
A step-by-step guide to import a NinjaScript strategy into NinjaTrader 8, compile it, add it to a chart, and run it safely in simulation before you go live.
A NinjaScript strategy usually arrives as a single file with a .zip extension, and it is tempting to unzip it. Do not. NinjaTrader 8 wants that zip whole, and the whole process, from that file to a strategy running on a live chart, is about fifteen minutes if you do the steps in the right order. Most of the trouble beginners hit comes from doing them in the wrong one.
This is the full sequence: import, compile, add to a chart, run in simulation, and only then go live. Here is each step, plus the specific gotchas that send people to the support form. If you are newer to the whole idea, the automated trading guide is the wider map this fits into.
What you need before you start
Three things have to be in place, or the later steps will not behave.
- NinjaTrader 8, connected to data. Not NinjaTrader 7, which uses a different, incompatible file format. You also need a data connection, live or a free simulated feed, so the platform has prices to work with. The platform itself is covered in NinjaTrader 8, explained.
- Enough history. Load at least 15 trading days of data on the chart. A strategy that references recent bars needs those bars to exist, and a chart showing only today will make it sit there quietly doing nothing.
Import the .zip whole, never unzipped, and always run in simulation before you connect real money. Every other mistake in this process is recoverable. Skipping the simulation step is the one that costs cash.
Step 1: import the file
In NinjaTrader, open the Control Center, then choose Tools > Import > NinjaScript Add-On. Point it at the .zip file exactly as you received it. NinjaTrader unpacks and installs the contents itself. This is why you leave the zip alone: the importer expects the original archive, not a folder of loose files you extracted by hand.
If the import succeeds you get a short confirmation. If it fails, the message almost always names the reason, and it is almost always either a NinjaTrader 7 file or a zip that someone already opened and re-compressed differently.
Step 3: add it to a chart
At the top of that same panel is the setting that matters most: Enabled. Set to false, the strategy is loaded but inert, plotting and calculating without sending a single order. That is exactly where you want it to begin.
Step 4: run it in simulation first, always
Before any real order, run the strategy on a simulated (Sim101) account. Connect to a sim data feed or use the playback connection, enable the strategy, and watch it operate for several sessions. You are checking that it places orders when you expect, that the stop and target appear in the market, and that it flattens when it should. This costs nothing and tells you almost everything.
The beginner gotchas, in one place
Almost every "it isn't working" ticket traces back to one of these.
Do you need a VPS to run it?
Only if you want the strategy to keep trading when your own computer is asleep or offline. NinjaTrader has to be running and connected for an automated strategy to work, so if you would rather not leave a machine on all day, a low-cost virtual private server handles it. Whether that is worth it for a once-a-day system is a real question, and it is weighed in do you need a VPS for automated trading. If you are mapping out your first month end to end, getting started in 30 days lays out a sensible pace.
Frequently asked questions
Do I need to unzip the NinjaScript file first?
No, and you should not. NinjaTrader 8 expects the original .zip archive and unpacks it during import through Tools, then Import, then NinjaScript Add-On. If you extract it yourself and try to import the loose files, the import usually fails or installs nothing usable. Leave the file exactly as you received it and let the platform do the unpacking.
Why doesn't my strategy appear in the list?
The most common reason is that it failed to compile, so it never became available. Open the NinjaScript Editor, press F5 to compile, and check the Errors tab: any red entries must be cleared before the strategy shows up. The other frequent cause is importing a NinjaTrader 7 file into NinjaTrader 8, which are not compatible. Confirm the file is built for version 8.
What instrument and chart should I use?
Using a different instrument or timeframe is the usual reason a correctly installed strategy appears to do nothing, because it is waiting for conditions it will never see on the wrong chart. Match the instrument and timeframe the strategy was built and tested for.
Do I have to leave my computer on for it to trade?
Yes. An automated NinjaScript strategy only runs while NinjaTrader is open and connected to data, so if your machine sleeps or loses its connection, the strategy stops. Traders who do not want to keep a computer running all day use a virtual private server to host the platform. For a system that trades once a day, whether that is worth the monthly cost is a judgment call worth reading up on before you commit.
- NinjaTrader 8 Help Guide, "Import" (NinjaScript Add-Ons).
- NinjaTrader 8 Help Guide, "Strategies" and "Strategy Analyzer."
- CME Group, "Micro E-mini Nasdaq-100 (MNQ)" contract specifications.
Educational content, not investment advice. Trading futures involves substantial risk of loss and is not suitable for every investor. Any reference to Algomyth results is hypothetical, simulated over historical data, and shown in full on the performance page; past performance does not guarantee future results.
Take the seat: watch the engines live
Three specialist engines on Nasdaq, S&P and Gold, every signal streamed the moment it happens, with the stop and the target written before the trade. From $149 a month per market.


