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 NullPointStrategies, Today, 05:17 AM
        0 responses
        43 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        124 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        65 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        42 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        46 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X