NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > Application Technical Support > Automated Trading

Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader.

Reply
 
Thread Tools Display Modes
Old 08-06-2010, 12:52 AM   #1
AnotherTrader
Senior Member
 
Join Date: Aug 2009
Posts: 269
Thanks: 41
Thanked 8 times in 8 posts
Send a message via ICQ to AnotherTrader
Default Timing sequence for "OnBarUpdate=True"

Hi,

I am trying to understand the detailed timing sequence for Ninjatrader (6.5) order placement in “live” trading.

Say,
- I have a NinjaScript strategy running on a 5-min chart, with OnBarUpdate = True.
- At 11h59:58, the last tick occurs within the 12h00:00 5-min candle/bar; this is the tick that will define the candle/bar closing price.
- Assume the next tick does not occur until 12h00:10 (i.e. 10 seconds after prior candle/bar close), so that the next candle/bar (i.e. the 12h05:00 5-min candle/bar) does not begin to be drawn on the chart until 12h00:10.
-
If the closing price of the 12h00:00 candle/bar was sufficient to trigger an entry signal under my strategy, when does NinjaTrader (6.5) begin the process of submitting the “live” order?

Is it at 12h00:00 (i.e. immediately after the time at which the candle/bar closed)?

Or is it at 12h00:10 (i.e. immediately after the new candle/bar begins to be drawn)?

Thanks.
AnotherTrader is offline  
Reply With Quote
Old 08-06-2010, 06:33 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,569
Thanks: 262
Thanked 1,018 times in 999 posts
Default

AnotherTrader, it would be submitted on the open tick of the new bar, as this is the tick that closes your prior 12:00 bar, as NinjaTrader's 'body' is event not solely time based.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 08-06-2010, 06:39 AM   #3
AnotherTrader
Senior Member
 
Join Date: Aug 2009
Posts: 269
Thanks: 41
Thanked 8 times in 8 posts
Send a message via ICQ to AnotherTrader
Default

Thanks, Bertrand.

Is there anything that can be set to force NT to submit the order at 12h00:00, rather than wait for the next tick?

And is it the same for NT7?
AnotherTrader is offline  
Reply With Quote
Old 08-06-2010, 07:00 AM   #4
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,569
Thanks: 262
Thanked 1,018 times in 999 posts
Default

This behavior is the same on NT7 - unfortunately you would not have your trade signal until you receive the closing tick of the 12:00 bar, even if this is coming in at 12:00:10
NinjaTrader_Bertrand is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
unrecognized escape sequence due to a "\" tinkerz General Programming 1 03-11-2010 10:13 AM
One long order + one short order with "liveUntilCancelled=true" doesn't work chrismasterlu Strategy Development 7 04-21-2009 01:24 PM
summary of "strategy realized" is not equal "account performance, total net profit"" Fragolino Miscellaneous Support 1 02-19-2009 04:12 AM
"Error calling onBarUpdate" problem Operandi Strategy Development 6 09-17-2008 09:12 AM
OnBarUpdate "context" in user defined method kgillis23 General Programming 3 01-08-2008 08:40 PM


All times are GMT -6. The time now is 06:53 PM.