PDA

View Full Version : When are Orders Placed and Executed?


Jim-Boulder
06-25-2007, 10:38 AM
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?

NinjaTrader_Ray
06-25-2007, 11:12 AM
Correct, set it to false.

Jim-Boulder
06-25-2007, 11:23 AM
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?

NinjaTrader_Ray
06-25-2007, 11:28 AM
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.


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.