Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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
JesseNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by George21, Today, 10:07 AM
|
1 response
11 views
0 likes
|
Last Post Today, 10:43 AM | ||
Started by geddyisodin, Yesterday, 05:20 AM
|
8 responses
50 views
0 likes
|
Last Post Today, 10:45 AM | ||
Started by DayTradingDEMON, Today, 09:28 AM
|
3 responses
20 views
0 likes
|
Last Post Today, 10:23 AM | ||
Started by Stanfillirenfro, Today, 07:23 AM
|
9 responses
23 views
0 likes
|
Last Post Today, 10:16 AM | ||
Started by navyguy06, Today, 09:28 AM
|
1 response
9 views
0 likes
|
Last Post Today, 09:54 AM |
Comment