Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

When are Orders Placed and Executed?

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

    When are Orders Placed and Executed?

    Can you calrify for me when Entry orders are placed using an automated strategy. Is it different if you have OnBarUpdate = true vs. false?

    If I have OnBarUpdate=True, are any orders triggered within my code entered at the moment the code directs a trade, or at the close of the bar?

    I want to place orders immediately when a certain condition (in the live or current bar) occurs and enter a limit order (to buy or sell)--but I want the order to be placed at that moment, not when the bar finishes.

    Should I set OnBarUpdate = false?
    Jim-Boulder
    NinjaTrader Ecosystem Vendor - Elephant Tracks

    #2
    Correct, set it to false.
    RayNinjaTrader Customer Service

    Comment


      #3
      Close

      Ray,

      Thanks for the rapid response. Is the following assumption correct: if OnBarUpdate = false, the Close[0] is always equal to the last traded price.

      If OnBarUpdate = true then Close[0] is truly the close of the bar.

      If I wanted to 'capture' the price in a 650 Volume Bar after 150 contracts had been traded (and OnBarUpdate=false)--could I use the Update() method and would I get the Close[0] at that point?
      Jim-Boulder
      NinjaTrader Ecosystem Vendor - Elephant Tracks

      Comment


        #4
        Originally posted by Jim-Boulder View Post
        Ray,

        Thanks for the rapid response. Is the following assumption correct: if OnBarUpdate = false, the Close[0] is always equal to the last traded price.

        If OnBarUpdate = true then Close[0] is truly the close of the bar.
        Answer: Correct.

        Originally posted by Jim-Boulder View Post
        If I wanted to 'capture' the price in a 650 Volume Bar after 150 contracts had been traded (and OnBarUpdate=false)--could I use the Update() method and would I get the Close[0] at that point?
        Answer: No. The Update() method is not relevant here. When calling Close[0], you will always get the last traded price for the current bar which is still forming.
        RayNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        117 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        166 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        85 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        130 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        88 views
        0 likes
        Last Post PaulMohn  
        Working...
        X