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 chbruno, Today, 04:10 PM
        0 responses
        1 view
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by josh18955, 03-25-2023, 11:16 AM
        6 responses
        436 views
        0 likes
        Last Post Delerium  
        Started by FAQtrader, Today, 03:35 PM
        0 responses
        6 views
        0 likes
        Last Post FAQtrader  
        Started by rocketman7, Today, 09:41 AM
        5 responses
        19 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by frslvr, 04-11-2024, 07:26 AM
        9 responses
        127 views
        1 like
        Last Post caryc123  
        Working...
        X