![]() |
|
|||||||
| 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. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Sep 2007
Posts: 88
Thanks: 0
Thanked 0 times in 0 posts
|
any idea why this happened.
here is the log and trace file. do i need to restart ninja after this? 1/9/2009 10:31:02 AM|1|32|Order='5292803/26294!Dorman!Dorman' Name='External' New State=Cancelled Instrument='GC 02-09' Action=Buy Limit price=0 Stop price=864 Quantity=1 Type=Stop Filled=0 Fill price=0 Error=NoError Native error='' 1/9/2009 10:50:25 AM|1|1|AT, 'PLACE;Sim101;ES 03-09;SELL;1;LIMIT;892.00;0;DAY;oco1clightES;idname1; clightes;stratidclightES1' processing 2009-01-09 10:31:02:928 (PETER) Cbi.OrderStatusEventArgs.Process: Order='5292803/26294!Dorman!Dorman' Name='External' New State=Cancelled Instrument='GC 02-09' Action=Buy Limit price=0 Stop price=864 Quantity=1 Type=Stop Filled=0 Fill price=0 Error=NoError Native error='' 2009-01-09 10:50:25:288 in OnUnhandledApplicationException 2009-01-09 10:50:25:288 ********* exception trapped ********* 2009-01-09 10:50:25:288 Item has already been added. Key in dictionary: 'Sim101' Key being added: 'Sim101' 2009-01-09 10:50:25:288 System.ArgumentException: Item has already been added. Key in dictionary: 'Sim101' Key being added: 'Sim101' at System.Windows.Forms.Control.MarshaledInvoke(Contr ol caller, Delegate method, Object[] args, Boolean synchronous) at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args) at NinjaTrader.Cbi.SynchronizeInvoke.Invoke(Delegate method, Object[] args) at NinjaTrader.Cbi.AutoTrade.OnFswChanged(Object sender, FileSystemEventArgs e) at System.IO.FileSystemWatcher.OnChanged(FileSystemEv entArgs e) at System.IO.FileSystemWatcher.NotifyFileSystemEventA rgs(Int32 action, String name) at System.IO.FileSystemWatcher.CompletionStatusChange d(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* overlappedPointer) at System.Threading._IOCompletionCallback.IOCompletio nCallback_Context(Object state) at System.Threading.ExecutionContext.runTryCode(Objec t userData) at System.Runtime.CompilerServices.RuntimeHelpers.Exe cuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.ExecutionContext.RunInternal(Exec utionContext executionContext, ContextCallback callback, Object state) at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state) at System.Threading._IOCompletionCallback.PerformIOCo mpletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP) |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
What did you happen to be doing when this occurred?
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Sep 2007
Posts: 88
Thanks: 0
Thanked 0 times in 0 posts
|
a oif order ws written and that caused the crash.
the order should have been similar to this one below (generated thought the oif generator) PLACE;SIM101;ES 03-09;SELL;1;LIMIT;899.00;0;DAY;oco1bclightES;idname5 ;clightes;stratidclightes1b this line below was written via tradestation file write. it causes the crash again. PLACE;Sim101;ES 03-09;SELL;1;LIMIT;898.75;0;DAY;oco1clightES;idname2; clightes;stratidclightES2 the ts code used is below vars:ep(0),gmt(0),StrategyName("clightes"),Contractname("ES"),stratid(1),atm("clightes"); ep=close+10; gmt=time*100; fileappend("t:\OIF-Se-"+numtostr(oifNo,0)+"-" +NUMTOSTR(DATE,0)+"-"+ NUMTOSTR(GMT,0)+"se"+StrategyName+Contractname+".t xt", "PLACE;"+ninjaaccount+";"+ninjaSymbol+";SELL;1;LIM IT;"+numtostr(ep,2)+";0;DAY;oco1"+StrategyName+con tractname+";idname"+numtostr(stratid,0)+";"+atm+"; stratid"+StrategyName+CONTRACTname+numtostr(strati d,0)+newline); later note, in comparing the lines they are idential in function.
Last edited by kiwibird; 01-09-2009 at 02:23 PM.
|
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
I have forwarded this to development. They should respond by Monday. Have a good weekend.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Member
Join Date: Sep 2007
Posts: 88
Thanks: 0
Thanked 0 times in 0 posts
|
Hi Josh,
i added more to me 233pm post. I put in more ts code, and compared the lines of text. they are identical in function. the filename will be something like OIF-Se-1-1090109-153204seclightES.txt
Last edited by kiwibird; 01-09-2009 at 02:33 PM.
|
|
|
|
|
|
#6 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Thank you kiwibird. Development is off for the day already. They will respond after the weekend.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Member
Join Date: Sep 2007
Posts: 88
Thanks: 0
Thanked 0 times in 0 posts
|
later note.
i tested this again from tradestation, and it worked perfectly. so i have only been able to reproduce the problem once |
|
|
|
|
|
#8 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
kiwibird,
We will need a reproducible scenario before we can proceed. If you manage to find one please let us know. Thank you.
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Editor exception | guy | Indicator Development | 8 | 12-06-2009 10:43 AM |
| Help with Exception Logic | shawnj | General Programming | 6 | 12-08-2008 06:21 AM |
| Strange exception | TheChingachgook | Strategy Development | 3 | 10-31-2008 09:45 AM |
| Unhandled Exception | adrian | Installation and Licensing | 6 | 03-13-2008 12:49 PM |
| Unhandled Exception | HudsonTrader | Miscellaneous Support | 5 | 02-04-2005 09:50 AM |