Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Can Strategy Instances be Added Programmatically?
Collapse
X
-
Can Strategy Instances be Added Programmatically?
I run NinjaScript strategies from the Strategies tab in the NinjaTrader 8 Control Center. At present I add strategy instances to this tab manually using the "New Strategy..." item on the Context Menu for the Strategies tab. I'd prefer to add strategy instances to this tab programmatically. Is it possible to add strategy instances to the Strategies tab programmatically using a NinjaTrader Add-On or using some other way that is internal or external to NinjaTrader? If the answer to this question is yes, then would you please recommend an approach for doing this?Tags: None
- Likes 2
-
I'd also like to make the request for this to be added. I currently have python code I wrote scanning for stocks and when they meet certain criteria it triggers an autohotkey script to click through the GUI to add a strategy. It would be much cleaner, faster, and more precise/accurate if I could add them programmatically using the same method call NT8 uses. Would you be able to say which DLL it calls and how so I can make an addon for it myself?
Comment
-
Is there perhaps any way to use the ATI, or the NTDirect.dll, or the File Interface to do it. Like I stated in the previous comment, I wrote a python script to create my strategies and can easily create a file for NT8 to read. Using the DLL is difficult but still doable.
Comment
-
Hello magnatauren,
You can use the file interface to submit external orders however there is very limited amount of information that can be retrieved through that system. You can read about that here: https://ninjatrader.com/support/help...file+interface
Comment
-
Yea, I read through the entirety of the ATI, NTDirect.dll, and File interface KB's and was unable to find anything on it. If possible could you just tell me a little information about how it's handled and I can make my own addon for it? Honestly if it were something like the file interface and could just accept a text file along the lines of
Create Strategy(StrategyName, Instrument, enabled, otherparameters...)
Unfortunately I can't just have a strategy running for each equity or else Kinetick chokes.
Comment
-
Hello magnatauren,
Starting strategies is internal logic, that is not something which is exposed to the user in any form. The File interface would be used for simple order submission but has no means to control strategies. The other dll interface is not supported but still has no means to start a strategy.
It sounds like from your post 3 that you already have a solution to this problem, as there is no NinjaScript way to accomplish this task I would suggest to just stick with that. There is a feature request in place for this so if development sees the need to add this they will update that and place the id in the change log.
In general it is not expected to be able to control strategies through code, enabling a strategy is a deliberate action for the user to trade for them starting at that point. If you want something that runs in the background without enabling it you would have to avoid strategies completely and use an addon. https://ninjatrader.com/support/help...t_overview.htm
Comment
-
Hello Derjan,
We have added a vote to "SFT-2844" to track your interest behind having functionality available to programmatically start strategies.
This is an internal number, but for anyone else wishing to have their interest tracked, please let our support staff know that you would like a vote added for this request.
Feature Request Disclaimer
We receive many requests and cannot reasonably implement all requested features or changes. Interest is tracked internally and if enough interest is tracked, it would be weighed against how feasible it would be to make those changes to consider implementing. As such we cannot offer an ETA or promise of fulfillment.
When new features are implemented, they will be listed in the Release Notes page of the Help Guide. The ID number will be different than the internal feature request tracking ID, but the description of the feature will let you know if that feature has been implemented.
Release Notes - https://ninjatrader.com/support/help...ease_notes.htm
Comment
-
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
558 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
324 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
545 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
547 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment