• 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

  • TazoTodua
    started a topic Initialize() VS OnStartUp()

    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?

  • NinjaTrader_ChelseaB
    replied
    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)

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by DariusDeck, Yesterday, 04:22 PM
4 responses
32 views
0 likes
Last Post DariusDeck  
Started by StevenNelson, Today, 05:49 AM
1 response
4 views
0 likes
Last Post NinjaTrader_PatrickG  
Started by fx.practic, Today, 01:41 AM
0 responses
11 views
0 likes
Last Post fx.practic  
Started by wolfcuring, Today, 01:29 AM
0 responses
4 views
0 likes
Last Post wolfcuring  
Started by BrandonT1292, 06-17-2019, 03:03 PM
2 responses
31 views
0 likes
Last Post thinarthrill  
Working...
X