NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 07-17-2012, 01:43 AM   #1
Jellybean
Member
 
Join Date: Apr 2012
Location: New Zealand
Posts: 58
Thanks: 14
Thanked 0 times in 0 posts
Default Limit order with & without GTC?

Hi

Is there any difference in the behaviour of a managed entry limit order (e.g. EnterLongLimit) in the following examples?

In both cases CalculateOnBarClose = false for every tick operation.

Example 1
entryOrder1 = EnterLongLimit( nContracts1, entryLevel, entryName1 );

Example 2
if( entryOrder1 == null )
entryOrder1 = EnterLongLimit( 0, true, nContracts1, entryLevel, entryName1 );

Specifically:
Where does the limit order reside in each example?
Does Example 1 send a new order to the trade server every tick?

Regards
Tony
Jellybean is offline  
Reply With Quote
Old 07-17-2012, 01:48 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,384
Thanks: 252
Thanked 967 times in 950 posts
Default

Tony, per default the orders would expire in NT at the end of the bar they were placed on, in your second example you set them to liveUntilCancelled, so they persist until you cancel or the end of session handling takes care.

The limit orders is working at your broker / exchange in both cases.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 07-17-2012, 02:28 AM   #3
Jellybean
Member
 
Join Date: Apr 2012
Location: New Zealand
Posts: 58
Thanks: 14
Thanked 0 times in 0 posts
Default

Thanks, Bertrand

I understand in the first example, the order expires at the end of the bar, but please clarify two points:
(a) When CalculateOnBarClose = false, does the order in Example 1 expire every tick or every completed bar?
(b) In example 1, is the order re-transmitted to the broker every time it expires/re-submits (every tick?) or is the effect that the order remains at the broker unless is it not re-submitted?

Regards
Tony
Jellybean is offline  
Reply With Quote
Old 07-17-2012, 02:40 AM   #4
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,384
Thanks: 252
Thanked 967 times in 950 posts
Default

Tom, it would expire on the next bar update seen, so next tick if COBC is false.

The order expiring means, it goes through a full cancel and resubmit cycle.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 07-17-2012, 02:53 AM   #5
Jellybean
Member
 
Join Date: Apr 2012
Location: New Zealand
Posts: 58
Thanks: 14
Thanked 0 times in 0 posts
Default

Thanks, Bertrand.

I will use GTC.

Regards
Tony
Jellybean 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
GTC order error dancorcal Automated Trading 1 05-13-2010 09:17 AM
Combination order type 'Limit' and time-in-force 'Gtc' not supported by exchange richa61416 Strategy Development 1 02-06-2008 03:22 PM
GTC Order with Amp Futures dgregor5 Strategy Development 4 01-02-2008 03:32 PM
Trying to cancel a GTC order fmhthree Miscellaneous Support 3 03-11-2007 04:32 PM
Put in a GTC order and it gets filled as a DAY order TraderPete Miscellaneous Support 2 12-14-2004 04:31 AM


All times are GMT -6. The time now is 01:14 AM.