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 SalmaTrader, 07-07-2026, 10:26 PM
      0 responses
      50 views
      0 likes
      Last Post SalmaTrader  
      Started by CarlTrading, 07-05-2026, 01:16 PM
      0 responses
      22 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 06-17-2026, 10:32 AM
      0 responses
      16 views
      0 likes
      Last Post CaptainJack  
      Started by kinfxhk, 06-17-2026, 04:15 AM
      0 responses
      22 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 06-17-2026, 04:06 AM
      0 responses
      23 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Working...
      X