Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Can a strategy be kicked off programmatically?
Collapse
X
-
Can a strategy be kicked off programmatically?
Hi, I am building some strategies that test a bunch of different parameters, each with a lot of options. I am wondering if there is anyway for me to kick off a strategy in NinjaScript where I would have the ability to iterate through my different combinations and possibilities and output the results either to text or to a DB. So to do this I guess what I am asking is can a Ninjascript strategy be kicked off in Ninja and can the results in the summary tab be captured in Ninjascript as well?Tags: None
-
Hello ErikY,
There would not be a way to start strategies or use the existing tools like the analyzer from NinjaScript.
If you waned to use the existing tools like the analyzer or use strategy performance values then you would have to write data for each instance of the strategy that was run. There is not a property to know when each test is over so you would basically need to update a file or outside database for each OnBarUpdate call until the test is over so you have the final data. Multiple strategy instances run at the same time so you would need to use unique files per instance or a means that allows multiple writes at the same time, writing to a single file would cause read/write errors.
The summary tab is a collection of either a single backtest result or in the optimizer is the selected result. To each strategy instance you wouldn't be able to access that specific summary but instead have each instances trade performance:
https://ninjatrader.com/support/help...erformance.htm
https://ninjatrader.com/support/help...collection.htm
https://ninjatrader.com/support/help...ancevalues.htm
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
54 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
130 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
73 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
44 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
49 views
0 likes
|
Last Post
|

Comment