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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      60 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      148 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      98 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      286 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X