• 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 drpapp, 01-24-2019, 06:57 AM
    6 responses
    71 views
    1 like
    Last Post brucerobinson  
    Started by ttodua, 12-06-2019, 11:40 PM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by HiddenPhilosopher, Today, 06:45 AM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by PG7940, Today, 04:26 AM
    1 response
    13 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Sh00tHerMcGavin, Yesterday, 07:39 PM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X