2016-01-14 09:58:29:037 *************** unhandled exception trapped ***************
2016-01-14 09:58:29:037 The type initializer for 'NinjaTrader.Cbi.AutoTrade' threw an exception.
2016-01-14 09:58:29:037 System.TypeInitializationException: The type initializer for 'NinjaTrader.Cbi.AutoTrade' threw an exception. ---> System.Data.SqlServerCe.SqlCeException: A duplicate value cannot be inserted into a unique index. [ Table name = Accounts,Constraint name = Accounts_ui0 ]
at System.Data.SqlServerCe.SqlCeCommand.ProcessResult s(Int32 hr)
at System.Data.SqlServerCe.SqlCeCommand.ExecuteComman dText(IntPtr& pCursor, Boolean& isBaseTableCursor)
at System.Data.SqlServerCe.SqlCeCommand.ExecuteComman d(CommandBehavior behavior, String method, ResultSetOptions options)
at System.Data.SqlServerCe.SqlCeCommand.ExecuteNonQue ry()
at NinjaTrader.Cbi.Account.DbAdd(Boolean persist)
at NinjaTrader.Cbi.DB.Init(Boolean updateAll, Boolean updateInstruments, Boolean updateInstrumentLists)
at NinjaTrader.Cbi.DB.get_Current()
at NinjaTrader.Cbi.Account.DbLoad()
at NinjaTrader.Cbi.Account.get_Accounts()
at NinjaTrader.Cbi.Account.add_AccountStatusUpdate(Ev entHandler`1 value)
at NinjaTrader.Cbi.AutoTrade..ctor()
at NinjaTrader.Cbi.AutoTrade..cctor()
--- End of inner exception stack trace ---
at NinjaTrader.Core.Globals.ApplicationStart(Action`1 splashMessageCallback, Action`1 errorCallback, Func`2 userFeedbackCallbackYesNoAll)
at NinjaTrader.AppHelper.<>c__DisplayClass0_3.<OnStar tup>b__0(Object o)
at System.Threading.ExecutionContext.RunInternal(Exec utionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System. Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
2016-01-14 09:58:31:916 Starting server message polling timer with interval 300 seconds...
Comment