Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Initialize() method or similar that runs once per optimization

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

    Initialize() method or similar that runs once per optimization

    Apologies if this has been asked already - I am a NinjaTrader newbie!

    The Initialize() method runs only once when starting a strategy or indicator. Is there a similar method that will run only once when starting an optimization session?

    For example, I want to perform a computationally expensive calculation on a set of historical data, then re-use the calculation during optimization on many inputs to speed up the optimization process. Is this possible?

    Thanks!

    #2
    Hello doranchak,
    Welcome to the forum and I am happy to assist you.

    We recommend using the OnStartUp event to calculate any one time calculations. Please refer to our help guide to know more about it



    Please let me know if I can assist you any further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      That's exactly what I needed. Thanks for your swift and courteous reply!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      639 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      366 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      107 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      569 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      572 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X