- ago
When I have unchecked Alpaca from both historical and streaming providers, and re-booted the computer, then try to drag a strategy to strategy monitor, the fatal error message refers to Alpaca, see below. Also note that broker in strategy monitor shows "not connected", and shows Alpaca when hover on it. When try to change broker, the same fatal error messages appear.

System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (One or more errors occurred. (Response status code does not indicate success: 401 (Unauthorized).))
---> System.AggregateException: One or more errors occurred. (Response status code does not indicate success: 401 (Unauthorized).)
---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at System.Net.Http.HttpClient.GetStringAsyncCore(Task`1 getTask)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at WealthLab.Alpaca.AlpacaBroker.Connect()
at WealthLab.Backtest.BrokerBase.ConnectBroker()
at RegValue.ForgotTransactionConsumer(Object , RegValue )
at WealthLab.WPF.ucBrokerAccountDropDown.<>c__DisplayClass17_0.CustomizeInvalidIndexer()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of inner exception stack trace ---

Here are the screen shots:


0
510
1 Replies

Reply

Bookmark

Sort
Glitch8
 ( 11.08% )
- ago
#1
It’s because Alpaca is the default broker you selected in the Order Manager. If you change the Order Manager default broker to the Dummy Broker, for example, then Alpaca won’t be selected when you drop a new Strategy into the SM.
0

Reply

Bookmark

Sort