• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Initialize() VS OnStartUp()

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

    Initialize() VS OnStartUp()

    I am not much advanced progrmmer in net, and cant find out the difference between these two methods...

    can anyone tell me why i should use Initilialize method at all for such stuff:


    CalculateOnBarClose = true;
    TraceOrders = true;
    SetProfitTarget("Short_signal", CalculationMode.Ticks, 21);
    ....


    may i move all those stuff into OnStartUp?

    #2
    Hello selnomeria,

    If it is Initialize() then it sets the default for property in the Indicator or Strategy window.

    If it is in OnStartUp() this will not set the default and will set the value just as the script starts (and will not be changeable in the UI)
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by pulpiwapi, 03-04-2019, 11:18 PM
    11 responses
    145 views
    0 likes
    Last Post music_p13  
    Started by indy73, Yesterday, 10:52 PM
    3 responses
    18 views
    0 likes
    Last Post sledge
    by sledge
     
    Started by priceisking, Today, 12:51 PM
    1 response
    20 views
    0 likes
    Last Post NinjaTrader_PaulH  
    Started by chartish, Today, 10:33 AM
    3 responses
    27 views
    0 likes
    Last Post chartish  
    Started by casabella, Today, 11:51 AM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_PaulH  
    Working...
    X