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!
See more
See less

Partner 728x90

Collapse

Can a strategy be kicked off programmatically?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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?

    #2
    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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by George21, Today, 10:07 AM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_ChristopherJ  
    Started by geddyisodin, Yesterday, 05:20 AM
    8 responses
    50 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by DayTradingDEMON, Today, 09:28 AM
    3 responses
    20 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Stanfillirenfro, Today, 07:23 AM
    9 responses
    23 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by navyguy06, Today, 09:28 AM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X