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 NullPointStrategies, Today, 05:17 AM
    0 responses
    20 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    119 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    63 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    41 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    45 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X