Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Prolonged execution time Strategy Builder

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

    Prolonged execution time Strategy Builder

    Hi. I would like to see if you can help me. In the Strategies tab within the NinjaScript Explorer, I have created 7 automatic strategies. The problem I have is that when I access any of them or try to create a new program it takes a long time to load, to add conditions within the Strategy Builder and to save the changes. With the consequent problem that this entails when you are making changes in the configuration of a strategy and testing it in the Strategy Analyzer. I do not know what can be due since my PC is i7 with 16Gb ram.

    Thanks for your time. Regards

    #2
    Hello Rober182,

    Thanks for your post.

    The Strategy Builder will create XML code that represents your logic configured in the Builder. When compiled, the script will generate NinjaScript code which is what actually gets processed in the platform. Both Strategy Builder XML and NinjaScript code are included in the file, so a complex Strategy Builder strategy will create a large file that will take a longer time to load than a standard NinjaScript strategy.

    Additionally, when backtesting, Strategy Builder strategies do not take advantage of IsInstantiatedOnEachOptimizationIteration since the generated code does not generate the code necessary to reset class level variables. IsInstantiatedOnEachOptimizationIteration is used to improve backtests speeds. Please see below for more details.

    IsInstantiatedOnEachOptimizationIteration - https://ninjatrader.com/support/help...niteration.htm

    The Strategy Builder is designed for creating simple strategies. A complex Strategy Builder strategy will take a long time to load for the reasons stated above and cannot be optimized for backtesting speeds because the generated code does not handle the behavior needed for IsInstantiatedOnEachOptimizationIteration.

    To improve strategy loading times, you can save a copy of the strategy and unlock it so there is no longer any XML code in the script. (Strategy Builder > General. See attached picture.) To improve backtesting speeds, please refer to the IsInstantiatedOnEachOptimizationIteration documentation linked above.

    Please let me know if I can be of further assistance.

    Comment


      #3
      Thank you very much for your response, Jim.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      77 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      45 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      27 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      32 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      62 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X