Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order Submission Easy Question

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

    Order Submission Easy Question

    When my strategy generates a buy or sell order, does it go straight to onOrderUpdate or does the program first complete the scan of remaining content in OnBarUpdate?

    #2
    Hello Doctor JR,

    Thank you for your inquiry.

    Since this is in relation to strategy development, I have moved this to the appropriate forum.

    OnBarUpdate and OnOrderUpdate are completely asynchronous, so when an order is placed it's running through both. This is why we suggest if you are tracking orders in Order variables that you assign the order in OnOrderUpdate so you can be sure the order has been created.

    Please let us know if we may be of further assistance to you.

    Comment


      #3
      Thanks for your response. My orders are assigned in onOrderUpdate but I'm not sure I understand your response, so I'll rephrase my question in my less-than-professional-level programming language:

      When I place an order in OnBarUpdate does the strategy complete the scan of onBarUpdate content before the order is communicated to onOrderUpdate or is OnOrderUpdate notified of the order and then the scan of remaining onBarUpdate continues. I have several different order types and this issue makes a difference (not of the most critical nature) in my coding.

      Comment


        #4
        Hello Doctor JR,

        Thank you for your reply.

        No, they are asynchronous. So when the order is fired off, OnOrderUpdate would run while OnBarUpdate is still running - it would not be queued to run after OnBarUpdate.

        Please let us know if we may be of further assistance to you.

        Comment


          #5
          Thank you! That is what I wanted to hear.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          46 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          22 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          33 views
          1 like
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          50 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          42 views
          0 likes
          Last Post CarlTrading  
          Working...
          X