• 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

OnOrderUpdate states

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

    OnOrderUpdate states

    which state is the right one to catch and use for the assignment of order name.
    OrderState.Working
    OrderState.Submitted

    My initial thought is "working" so I know it was accepted without issues.

    ??

    #2
    Hello dadarara,

    Thank you for your note.

    When you refer to the order name, are you referring to the signal name or are you referring to assigning the order to an order object?

    The orders signal name is assigned when submitted, see enter long section of our helpguide,
    https://ninjatrader.com/support/foru...ead.php?t=7499

    Whereas the order object can be assigned in the OnOrderUpdate,
    https://ninjatrader.com/support/help...-us/?order.htm

    I look forward to your reply.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      I am asking about the order object assigned in OnOrderUpdate,

      if i use :

      if (order.Name == "myEntryOrder")
      entryOrder = order;

      it means that every state the OnOrderUpdate is called ( submitted, accepted etc...) is is assigned over and over again.
      I am actually asking if that has any negative aspects to it ?
      and maybe its better :

      if (order.Name == "myEntryOrder" && order.OrderState == OrderState.Working)
      entryOrder = order;

      and if so, is it better to use OrderState.Submitted ?

      Comment


        #4
        Hello dadarara,

        There is no issue assigning the entry order on each OnOrderUpdate, as long as you uniquely name your entries. Limiting its assignment only when state.submitted would not be suggested.

        Please let us know if you need further assistance.
        Alan P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by mittie3, Today, 03:33 AM
        0 responses
        4 views
        0 likes
        Last Post mittie3
        by mittie3
         
        Started by Againmain1, Today, 03:04 AM
        0 responses
        6 views
        0 likes
        Last Post Againmain1  
        Started by tonytimpa, Today, 01:33 AM
        0 responses
        5 views
        0 likes
        Last Post tonytimpa  
        Started by kiwidtrader, Yesterday, 11:49 PM
        0 responses
        5 views
        0 likes
        Last Post kiwidtrader  
        Started by jmahon, Yesterday, 11:44 PM
        0 responses
        7 views
        0 likes
        Last Post jmahon
        by jmahon
         
        Working...
        X