Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AI Generate IsInstantiatedOnEachOptimizationIteration?

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

    AI Generate IsInstantiatedOnEachOptimizationIteration?

    I was using the new AI Generate (Experimental) feature and noticed that the strategies being generated have:

    Code:
    IsInstantiatedOnEachOptimizationIteration = true;
    And I found this in the source code class GeneratedStrategyLogic:

    Code:
    s.Indent(4);                        s.Append("IsInstantiatedOnEachOptimizationIteration = true;" + Environment.NewLine);
    Is this the code being used to generate the AI strategies?
    If Yes can I change this to false to improve performance?
    I am running the AI Generate using 15 years of historical data on ~60 ETFs with Optimize => Aggregated checked.

    Thanks,
    Erik

    #2
    Hello ErikHR1969,

    Thank you for your post.

    AI Generate strategies are not designed to mind the intricacies necessary to reset class level variables in State.DataLoaded. Changes would need to be made to support IsInstantiatedOnEachOptimizationIteration = false after the strategy is generated. Changing this within the GeneratedStrategyLogic class would not speed up AI Generate, nor can you actually make changes to the StrategyGenerator file through the NinjaScript Editor. Manual modification is also not recommended as this may break the AI Generate function entirely.

    Please see our help guide that illustrates resetting class level variables when IsInstantiatedOnEachOptimizationIteration is set to false:



    Please let us know if we may be of further assistance to you.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    91 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    137 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    121 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    72 views
    0 likes
    Last Post PaulMohn  
    Working...
    X