Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnStartup vs Initialize

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

    OnStartup vs Initialize

    hi,
    From release notes, OnStartup is called after Initialize but before any other event call.
    So when will one use OnStartup instead of Initialize ?

    Also when is onTermination called ?
    If i disable a strategy, is onTermination called ?
    if no, is there anEvent that is triggered when i disable a strategy ?

    thanks

    #2
    aljafp, OnStartUp() was introduced as the Initialize() could be called multiple times as indicators and strategies are added, OnStartUp() is only called once and would thus allow for example allow allocating custom resources needed.

    You can can use OnTermination() to clean up all resources used by the custom indicator / strategy, this is a new method for NT7 was previously achieved by overriding the basic Dispose() method.
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by rocketman7, Today, 01:00 AM
    0 responses
    1 view
    0 likes
    Last Post rocketman7  
    Started by wzgy0920, 04-20-2024, 06:09 PM
    2 responses
    27 views
    0 likes
    Last Post wzgy0920  
    Started by wzgy0920, 02-22-2024, 01:11 AM
    5 responses
    32 views
    0 likes
    Last Post wzgy0920  
    Started by wzgy0920, 04-23-2024, 09:53 PM
    2 responses
    74 views
    0 likes
    Last Post wzgy0920  
    Started by Kensonprib, 04-28-2021, 10:11 AM
    5 responses
    193 views
    0 likes
    Last Post Hasadafa  
    Working...
    X