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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      68 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      37 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      61 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      62 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      53 views
      0 likes
      Last Post CarlTrading  
      Working...
      X