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 04-02-2008, 08:02 PM   #1
goover
Junior Member
 
Join Date: Feb 2008
Posts: 22
Thanks: 0
Thanked 0 times in 0 posts
Default Multi Insruments Multiple Opposing Limit Order Entry not fixed

Hi,

I brought up this issue when NT was in beta 10. Ray said it's a bug that has been fixed in the next version (which is ver.6.5.1000.1). But when i test it, it's still can't send multiple opposing limit orders to broker (all are different instruments). It just only send short limit / long limit order only. I would like to have this bug fixed as soon as possible as i really need it.

My limit orders code are:

PHP Code:
entryOrder_1 EnterShortLimit(0true100000, (GetCurrentBid(0)), "Short 1");
entryOrder_2 EnterLongLimit(1true100000, (GetCurrentAsk(1)), "Long 2");
entryOrder_3 EnterLongLimit(2true100000, (GetCurrentAsk(2)), "Long 3"); 

PS: I am using MBT sending forex type orders.

Thanks.
goover is offline  
Reply With Quote
Old 04-03-2008, 01:24 AM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
Default

Hi goover,

Have you tried using TraceOrders = true? Anything interesting being printed with that set to true?
NinjaTrader_Josh is offline  
Reply With Quote
Old 04-03-2008, 04:35 AM   #3
goover
Junior Member
 
Join Date: Feb 2008
Posts: 22
Thanks: 0
Thanked 0 times in 0 posts
Default

Yes, this is the output:

PHP Code:
3/19/2008 12:03:00 AM Entered internal PlaceOrder() method at 3/19/2008 12:03:00 AMAction=SellShort OrderType=Limit Quantity=0.01M LimitPrice=155.01 StopPrice=0 SignalName='Short 1' FromEntrySignal=''
3/19/2008 12:03:00 AM Entered internal PlaceOrder() method at 3/19/2008 12:03:00 AMAction=Buy OrderType=Limit Quantity=0.01M LimitPrice=1.5781 StopPrice=0 SignalName='Long 2' FromEntrySignal=''
3/19/2008 12:03:00 AM Entered internal PlaceOrder() method at 3/19/2008 12:03:00 AMAction=Buy OrderType=Limit Quantity=0.01M LimitPrice=0.9900 StopPrice=0 SignalName='Long 3' FromEntrySignal='' 


Attached with the code with i do testing:

PHP Code:
  private IOrder entryOrder_1 null;
  private 
IOrder entryOrder_2 null;
  private 
IOrder entryOrder_3 null;
  
/// <summary>
        /// This method is used to configure the strategy and is called once before any strategy method is called.
        /// </summary>
        
protected override void Initialize()
        {
   
Add("$EURUSD"PeriodType.Minute1);
   
Add("$USDCHF"PeriodType.Minute1);
   
TraceOrders true;
   
CalculateOnBarClose false;
   
EntriesPerDirection 1
   
EntryHandling EntryHandling.UniqueEntries;
   
ExitOnClose false;
   
TraceOrders true;
        }
        
/// <summary>
        /// Called on each bar update event (incoming tick)
        /// </summary>
        
protected override void OnBarUpdate()
        {
   if(
entryOrder_1 == null && entryOrder_2 == null && entryOrder_3 == null)
   {
    
entryOrder_1 EnterShortLimit(0true10000, (GetCurrentBid(0)), "Short 1");
    
entryOrder_2 EnterLongLimit(1true10000, (GetCurrentAsk(1)), "Long 2");
    
entryOrder_3 EnterLongLimit(2true10000, (GetCurrentAsk(2)), "Long 3");
    
//entryOrder_1 = EnterShort(0, 10000, "Short 1");
    //entryOrder_2 = EnterLong(1, 10000, "Long 2");
    //entryOrder_3 = EnterLong(2, 10000, "Long 3");
   

 
   
DrawTextFixed("MO",    "\nP.1.: " Positions[0].MarketPosition.ToString() +
           
"\nP.2.: " Positions[1].MarketPosition.ToString() +
           
"\nP.3.: " Positions[2].MarketPosition.ToString(), TextPosition.TopLeft);
        } 
Attached Files
File Type: zip MultipleLimitOrders.zip (1.3 KB, 12 views)
goover is offline  
Reply With Quote
Old 04-03-2008, 09:31 AM   #4
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

Thanks for providing the sample. We will investigate this.
NinjaTrader_Ray is offline  
Reply With Quote
Old 04-03-2008, 02:23 PM   #5
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

We believe we have resolved this issue and Josh will be running some internal tests on the changes in the upcoming days, if all is well, we will have it in our next update.
NinjaTrader_Ray is offline  
Reply With Quote
Old 04-09-2008, 02:15 AM   #6
goover
Junior Member
 
Join Date: Feb 2008
Posts: 22
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks, please keep me informed once this limitation has been removed and will be included in the next version.

Quote:
Originally Posted by NinjaTrader_Ray View Post
We believe we have resolved this issue and Josh will be running some internal tests on the changes in the upcoming days, if all is well, we will have it in our next update.
goover is offline  
Reply With Quote
Old 04-09-2008, 02:23 AM   #7
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
Default

Hi goover,

We are still investigating the situation at hand and will keep you posted. Thank you for your patience.
NinjaTrader_Josh is offline  
Reply With Quote
Old 04-14-2008, 01:57 AM   #8
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
Default

Hi goover,

Thank you for reporting the bug. We will work to rectify the issue and inform you when the fix is ready.
NinjaTrader_Josh 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
entering 2 opposing limit orders stevenk Miscellaneous Support 6 04-20-2008 07:45 AM
Multi-instrument Strategy - Order Entry problem yot1120 Strategy Development 15 03-23-2008 06:40 PM
Use of Order Entry APIs in multi-instrument environment lclifner General Programming 2 10-11-2007 05:58 PM
Sim limit order entry bug? Json Miscellaneous Support 1 12-01-2006 03:38 AM
Submit Limit Entry Order and Stop Loss Order at same time? aspTrader Miscellaneous Support 2 10-04-2006 02:40 AM


All times are GMT -6. The time now is 10:58 AM.