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 09-23-2010, 07:19 AM   #1
DTRADE88
Junior Member
 
Join Date: Oct 2008
Posts: 17
Thanks: 0
Thanked 0 times in 0 posts
Default NT 6.5 --> MBT --> Collective2 erroneous orders

Hello,

I'm using TradeStation --> NT 6.5 --> MB Trading setup. Use e-mail interface to send signals from TradeStation to NT. Multi-broker license. Use NT to submit orders to Collective2. Encountered a situation last night where NT erroneously re-submitted a previous order to Collective2 resulting in a loss to my C2 account. The original order was executed around 1530 EST and sent to Collective2 without any problems. Position was closed around 1600 EST and I disconnected NT around 1615 EST and subsequently re-connected NT to my MBT account around 2000 EST. At 2033 EST, NT announced "Connection Lost". In about 30 seconds, connection to MBT was restored. On re-connect, NT announced "order filled" several times although no new orders were submitted and the only order being shown was the original order from 1530 EST. I checked my MBT account and confirmed that no new orders have been submitted despite NT's announcement. However, NT apparently re-submitted the original order to Collective2. I'm not sure what caused NT to lose connection in the first place, but there's something about the SEQUENCE in which the connection to MBT was restored that caused NT to think that new orders were hitting my MBT account - in turn causing NT to relay them to Collective2.

I've been using NT to submit orders to Collective2 for about 5 months now. This is the 2nd time that I encountered a situation where NT re-submits a previously executed order to Collective2 on re-connect to MBT after losing connection. I sent trace/log files to NT support - but they have no clue what caused this or how to fix this. Has any other NT user encountered a similar situation? Needless to say, if anyone from NT is reading this and has ideas on how to fix this, please let me know. Thanks.
DTRADE88 is offline  
Reply With Quote
Old 09-23-2010, 07:48 AM   #2
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,499
Thanks: 109
Thanked 291 times in 280 posts
Default

Hello,

The orders that are resubmitted to collective 2? Are they currently active orders / open positions with MBT at the time?
NinjaTrader_Brett is offline  
Reply With Quote
Old 09-23-2010, 07:52 AM   #3
DTRADE88
Junior Member
 
Join Date: Oct 2008
Posts: 17
Thanks: 0
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by NinjaTrader_Brett View Post
Hello,

The orders that are resubmitted to collective 2? Are they currently active orders / open positions with MBT at the time?
The order that was re-submitted to Collective2 was for a CLOSED long position and hence contained 1 buy leg and 1 sell leg.

Also, if it helps, I'm using "Submit market order on TS fill" option for order handling to keep things as simple as possible - so no unexecuted orders reside on MBT servers.
Last edited by DTRADE88; 09-23-2010 at 07:55 AM.
DTRADE88 is offline  
Reply With Quote
Old 09-23-2010, 07:55 AM   #4
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,499
Thanks: 109
Thanked 291 times in 280 posts
Default

Hello,

I'd be interested in taking a look at the log for this new case and review it to make sure nothing was missed. If you would please send the below files to support at ninjatrader dot com and reference this forum post and put ATTN: Brett in the subject line.

You can find these files at the following locations, please attach these to a return email.
Start Menu--> My Documents--> NinjaTrader 6.5--> Trace--> trace.20100923 for today. (trace.yyyymmdd for any other date)
Start Menu--> My Documents--> NinjaTrader 6.5--> Log--> log.20100923 for today. (log.yyyymmdd for any other date)

Please also let me know the exact or about exact time the orders where submitted to collective 2.

Thank You.
NinjaTrader_Brett is offline  
Reply With Quote
Old 09-23-2010, 08:02 AM   #5
DTRADE88
Junior Member
 
Join Date: Oct 2008
Posts: 17
Thanks: 0
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by NinjaTrader_Brett View Post
Hello,

I'd be interested in taking a look at the log for this new case and review it to make sure nothing was missed. If you would please send the below files to support at ninjatrader dot com and reference this forum post and put ATTN: Brett in the subject line.

You can find these files at the following locations, please attach these to a return email.
Start Menu--> My Documents--> NinjaTrader 6.5--> Trace--> trace.20100923 for today. (trace.yyyymmdd for any other date)
Start Menu--> My Documents--> NinjaTrader 6.5--> Log--> log.20100923 for today. (log.yyyymmdd for any other date)

Please also let me know the exact or about exact time the orders where submitted to collective 2.

Thank You.
Brett,

Appreciate you looking into this. Just re-sent the log/trace files. The erroneous trade took place on 9/22/2010 8:44:37 PM. The original trade (that was erroneously re-submitted to C2) took place on 9/22/2010 3:34:01 PM.
DTRADE88 is offline  
Reply With Quote
Old 09-23-2010, 06:12 PM   #6
DTRADE88
Junior Member
 
Join Date: Oct 2008
Posts: 17
Thanks: 0
Thanked 0 times in 0 posts
Default

For all NT users reading this post:

NT diagnosis: corrupted NT database.
NT solution: rename existing NT database (My Documents--> NinjaTrader 6.5--> DB--> NinjaTrader.MDB) to NewNinjaTrader.MDB and restart.
DTRADE88 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
InteractiveBrokers>OwnData>TS8>NinjaTrader(Simulation Edition)<Interactive Brokers virtu Automated Trading 28 05-26-2010 03:35 PM
tools>options>data tab> kassaindia Strategy Analyzer 5 02-02-2010 10:49 AM
Adding audio alert to Double MA>>>>? jeffalan2112 General Programming 1 07-24-2009 06:53 AM
Ticket #36818]: URGENT>>help me activate my account ASAP tailgunner Installation and Licensing 1 10-29-2007 01:23 AM
Code->test/debug->change code->retest ... cycle process bbarroux Strategy Development 3 10-02-2007 12:44 PM


All times are GMT -6. The time now is 12:31 PM.