- ago
After re-starting Wealth-Lab, re-generating the Alpaca keys, and setting up strategy monitor again, there was activity in the log pane:

6/21/2021 08:32:45: Status = LoadingData
6/21/2021 08:32:45: Start Streaming Thread
6/21/2021 08:32:45: Populating Data
6/21/2021 08:32:45: Calling GetHistories Pass 1
6/21/2021 08:32:46: GetHistories returned with 2 symbols
6/21/2021 08:32:46: Calling GetHistories Pass 2
6/21/2021 08:32:46: GetHistories returned with 2 symbols
6/21/2021 08:32:46: SOXS has 268 bars from IQFeed
6/21/2021 08:32:46: SOXL has 268 bars from IQFeed
6/21/2021 08:32:46: NextRun set to 6/21/2021 11:45 AM
6/21/2021 08:32:46: Status = Idle
6/21/2021 08:32:46: SOXS got Partial Bar from IQFeed
6/21/2021 08:32:46: SOXL got Partial Bar from IQFeed
6/21/2021 08:45:00: Status = Processing
6/21/2021 08:45:03: Ran Strategy on SOXL: 0 Signals, Run Time=726ms
6/21/2021 08:45:50: NextRun set to 6/21/2021 12:00 PM
6/21/2021 08:45:50: Status = Incomplete
6/21/2021 08:45:50: 1 Symbol not Processed: SOXS

I am using the sample strategy sma50 sma200 crossover, changed to sma2 sma5 crossover, using 15-min bars. The data set is SOXL and SOXS, IQFeed.

The log shows "incomplete" and "1 symbol not processed". I have no idea how to resolve this.

0
2,188
Solved
25 Replies

Reply

Bookmark

Sort
Cone8
 ( 4.83% )
- ago
#1
I can't tell you why, but SOXS didn't get updated by IQFeed during the interval. You can tell this because it "timed-out" after 50 seconds.

Did it starting working on the next interval?

You selected IQFeed Streaming or Streaming bars? (both should work of course)
0
- ago
#2
Here is more info: the strategy turned red after the first 15-min bar. I re-started WL, started strategy monitor, then dragged the strategy over. Before the configuration window appeared, the error box showed up:

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 SpecificationHelper.RateCallback(Object , SpecificationHelper )
at WealthLab7.StrategyMonitorSettingsWindow.CountAuthentication()
at WealthLab7.StrategyMonitorSettingsWindow.DefineAuthentication()
at WealthLab7.StrategyMonitorSettingsWindow..ctor(Strategy strategy, cwStrategyMonitor smWindow)
at WealthLab7.cwStrategyMonitor.AddStrategy(Strategy s)
at WealthLab7.cwStrategyMonitor.DisableUtils(Object config, DragEventArgs cust)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.OleDropTarget.RaiseDragEvent(RoutedEvent dragEvent, Int32 dragDropKeyStates, Int32& effects, DependencyObject target, Point targetPoint)
at System.Windows.OleDropTarget.MS.Win32.UnsafeNativeMethods.IOleDropTarget.OleDrop(Object data, Int32 dragDropKeyStates, Int64 point, Int32& effects)
at MS.Win32.UnsafeNativeMethods.DoDragDrop(IDataObject dataObject, IOleDropSource dropSource, Int32 allowedEffects, Int32[] finalEffect)
at System.Windows.OleServicesContext.OleDoDragDrop(IDataObject dataObject, IOleDropSource dropSource, Int32 allowedEffects, Int32[] finalEffect)
at System.Windows.DragDrop.OleDoDragDrop(DependencyObject dragSource, DataObject dataObject, DragDropEffects allowedEffects)
at System.Windows.DragDrop.DoDragDrop(DependencyObject dragSource, Object data, DragDropEffects allowedEffects)
at PredicateModel.RateCallback(DependencyObject , Object , DragDropEffects , PredicateModel )
at WealthLab7.ucStrategies.QueryDefinition(Object i, TreeViewItemEventArgs second)
at WealthLab.WPF.TreeViewEx.OnMouseMove(MouseEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
0
- ago
#3
No, after turning red, subsequent 15-min bars generated no activity.

I just restarted WL again, and tried to set up strategy monitor. Now there are two error message windows:

0
- ago
#4
Here is yet one more observation to help you:

The API key shown in data manager is not the one I re-created and entered about an hour ago. Here is what I see:
0
Cone8
 ( 4.83% )
- ago
#5
We're going to have to give this some thought why you're experience so many problems like this..

Just to show you, it does work - at least for us. Here's an example of a Error response for selling positions that weren't available at the broker-

0
Cone8
 ( 4.83% )
- ago
#6
Again, there's no reason that streaming test should not work.

0
- ago
#7
Yeah, could be an authorization failure or another one-time issue at Alpaca for pepeters' account.
0
- ago
#8
Streaming worked earlier today using Alpaca. However when I re-started WL, the Alpaca streaming did not work. I observed that the API key showing was wrong. When I re-entered the one I created earlier today, the streaming worked again. One can deduce that your code does not handle the situation where the user changes their keys. I had to change my keys because the one I had earlier quit working.

Here is another concern I have: when the strategy is dragged and dropped to strategy monitor, the setup shows Alpaca as the broker:


However, looking at the log pane, IQ Feed is mentioned:

6/21/2021 09:43:41: Status = LoadingData
6/21/2021 09:43:41: Start Streaming Thread
6/21/2021 09:43:41: Populating Data
6/21/2021 09:43:41: Calling GetHistories Pass 1
6/21/2021 09:43:47: GetHistories returned with 6 symbols
6/21/2021 09:43:47: Calling GetHistories Pass 2
6/21/2021 09:43:47: GetHistories returned with 6 symbols
6/21/2021 09:43:47: QYLD has 350 bars from IQFeed
6/21/2021 09:43:47: UDOW has 350 bars from IQFeed
6/21/2021 09:43:47: SDOW has 350 bars from IQFeed
6/21/2021 09:43:47: PSQ has 350 bars from IQFeed
6/21/2021 09:43:47: SOXS has 350 bars from IQFeed
6/21/2021 09:43:47: SOXL has 350 bars from IQFeed
6/21/2021 09:43:47: NextRun set to 6/21/2021 12:45 PM
6/21/2021 09:43:47: Status = Idle
6/21/2021 09:43:47: UDOW got Partial Bar from IQFeed
6/21/2021 09:43:47: SDOW got Partial Bar from IQFeed
6/21/2021 09:43:47: PSQ got Partial Bar from IQFeed
6/21/2021 09:43:47: SOXS got Partial Bar from IQFeed
6/21/2021 09:43:47: SOXL got Partial Bar from IQFeed
6/21/2021 09:43:47: QYLD got Partial Bar from IQFeed
6/21/2021 09:43:53: Status = Deactivated
6/21/2021 09:43:53: Leaving Streaming Thread
6/21/2021 09:44:02: Status = LoadingData
6/21/2021 09:44:02: Start Streaming Thread
6/21/2021 09:44:02: Populating Data
6/21/2021 09:44:02: Calling GetHistories Pass 1
6/21/2021 09:44:03: GetHistories returned with 6 symbols
6/21/2021 09:44:03: Calling GetHistories Pass 2
6/21/2021 09:44:03: GetHistories returned with 6 symbols
6/21/2021 09:44:03: PSQ has 272 bars from IQFeed
6/21/2021 09:44:03: SDOW has 272 bars from IQFeed
6/21/2021 09:44:03: UDOW has 272 bars from IQFeed
6/21/2021 09:44:03: QYLD has 272 bars from IQFeed
6/21/2021 09:44:03: SOXL has 272 bars from IQFeed
6/21/2021 09:44:03: SOXS has 272 bars from IQFeed
6/21/2021 09:44:03: NextRun set to 6/21/2021 12:45 PM
6/21/2021 09:44:03: Status = Idle
6/21/2021 09:44:03: PSQ got Partial Bar from IQFeed
6/21/2021 09:44:03: SOXS got Partial Bar from IQFeed
6/21/2021 09:44:03: QYLD got Partial Bar from IQFeed
6/21/2021 09:44:03: SOXL got Partial Bar from IQFeed
6/21/2021 09:44:03: UDOW got Partial Bar from IQFeed
6/21/2021 09:44:03: SDOW got Partial Bar from IQFeed
6/21/2021 09:45:00: Status = Processing
6/21/2021 09:45:11: Ran Strategy on SOXL: 0 Signals, Run Time=860ms
6/21/2021 09:45:28: Ran Strategy on QYLD: 0 Signals, Run Time=371ms
6/21/2021 09:45:50: NextRun set to 6/21/2021 1:00 PM
6/21/2021 09:45:50: Status = Incomplete
6/21/2021 09:45:50: 4 Symbols not Processed: PSQ,SDOW,UDOW,SOXS
6/21/2021 10:00:00: Status = Processing
6/21/2021 10:00:10: Ran Strategy on QYLD: 0 Signals, Run Time=373ms
6/21/2021 10:00:50: NextRun set to 6/21/2021 1:15 PM
6/21/2021 10:00:50: Status = Incomplete
6/21/2021 10:00:50: 5 Symbols not Processed: PSQ,SDOW,UDOW,SOXL,SOXS




0
Glitch8
 ( 11.08% )
- ago
#9
1) That's correct, IQFeed was used to supply the intraday HISTORICAL data, according to the log. Perhaps this is because you have IQFeed selected as a Provider in your Data Manager, and it has a higher priority than Alpaca? Anyway, I would leave this because the IQFeed historical data is much better than the Alpaca.

2) I'm not sure how we could possibly detect when you change your Alpaca keys!! If you change your key, of course you need to re-configure that in WL7.
0
- ago
#10
Wealth-Lab appears to be keeping the first set of keys I entered. Each time I start it up, it has the old keys. I have to delete them, and then enter the current ones. Maybe you need a "save" button somewhere.
0
- ago
#11
I also cannot connect to Alpaca. Get error unauthorized. Cannot enter the account number, get errors, option "Shutdown" or "Continue".
0
- ago
#12
Strategy Monitor is partially running now, however you can see in the Log Pane that many of the symbols are not being processed. The data set has 40 symbols, and 30 were not processed. I will also see sometimes that with a data set of two symbols, one will not be processed:

6/21/2021 11:52:40: Status = LoadingData
6/21/2021 11:52:40: Start Streaming Thread
6/21/2021 11:52:40: Populating Data
6/21/2021 11:52:40: Calling GetHistories Pass 1
6/21/2021 11:52:45: GetHistories returned with 40 symbols
6/21/2021 11:52:45: Calling GetHistories Pass 2
6/21/2021 11:52:51: GetHistories returned with 40 symbols
6/21/2021 11:52:51: AMEH has 281 bars from IQFeed
6/21/2021 11:52:51: CTSDF has 217 bars from IQFeed
6/21/2021 11:52:51: ANAT has 267 bars from IQFeed
6/21/2021 11:52:51: PKI has 281 bars from IQFeed
6/21/2021 11:52:51: GATO has 281 bars from IQFeed
6/21/2021 11:52:51: EMKR has 281 bars from IQFeed
6/21/2021 11:52:51: VSTO has 281 bars from IQFeed
6/21/2021 11:52:51: KLIC has 281 bars from IQFeed
6/21/2021 11:52:51: BNTX has 281 bars from IQFeed
6/21/2021 11:52:51: ASO has 281 bars from IQFeed
6/21/2021 11:52:51: CTXR has 281 bars from IQFeed
6/21/2021 11:52:51: BBW has 281 bars from IQFeed
6/21/2021 11:52:51: POOL has 281 bars from IQFeed
6/21/2021 11:52:51: GNRC has 281 bars from IQFeed
6/21/2021 11:52:51: EPAM has 281 bars from IQFeed
6/21/2021 11:52:51: LDL has 271 bars from IQFeed
6/21/2021 11:52:51: BYDDF has 280 bars from IQFeed
6/21/2021 11:52:51: AVID has 281 bars from IQFeed
6/21/2021 11:52:51: DHR has 281 bars from IQFeed
6/21/2021 11:52:51: CAI has 281 bars from IQFeed
6/21/2021 11:52:51: PRFT has 281 bars from IQFeed
6/21/2021 11:52:51: GSL has 281 bars from IQFeed
6/21/2021 11:52:51: ESEA has 279 bars from IQFeed
6/21/2021 11:52:51: WLMS has 281 bars from IQFeed
6/21/2021 11:52:51: DSX has 281 bars from IQFeed
6/21/2021 11:52:51: MRNA has 281 bars from IQFeed
6/21/2021 11:52:51: BYDDY has 279 bars from IQFeed
6/21/2021 11:52:51: EBR has 281 bars from IQFeed
6/21/2021 11:52:51: FLWS has 281 bars from IQFeed
6/21/2021 11:52:51: CROX has 281 bars from IQFeed
6/21/2021 11:52:51: SLCT has 281 bars from IQFeed
6/21/2021 11:52:51: ICON has 275 bars from IQFeed
6/21/2021 11:52:51: NVDA has 281 bars from IQFeed
6/21/2021 11:52:51: WST has 281 bars from IQFeed
6/21/2021 11:52:51: XPEL has 279 bars from IQFeed
6/21/2021 11:52:51: FTNT has 281 bars from IQFeed
6/21/2021 11:52:51: INTT has 273 bars from IQFeed
6/21/2021 11:52:51: OAS has 281 bars from IQFeed
6/21/2021 11:52:51: ZIM has 281 bars from IQFeed
6/21/2021 11:52:51: SWBI has 281 bars from IQFeed
6/21/2021 11:52:51: NextRun set to 6/21/2021 3:00 PM
6/21/2021 11:52:51: Status = Idle
6/21/2021 11:52:51: AMEH got Partial Bar from IQFeed
6/21/2021 11:52:51: EMKR got Partial Bar from IQFeed
6/21/2021 11:52:51: CTXR got Partial Bar from IQFeed
6/21/2021 11:52:51: LDL got Partial Bar from IQFeed
6/21/2021 11:52:51: MRNA got Partial Bar from IQFeed
6/21/2021 11:52:51: PRFT got Partial Bar from IQFeed
6/21/2021 11:52:51: SLCT got Partial Bar from IQFeed
6/21/2021 11:52:51: FTNT got Partial Bar from IQFeed
6/21/2021 11:52:51: CTSDF got Partial Bar from IQFeed
6/21/2021 11:52:51: VSTO got Partial Bar from IQFeed
6/21/2021 11:52:51: BBW got Partial Bar from IQFeed
6/21/2021 11:52:51: BYDDF got Partial Bar from IQFeed
6/21/2021 11:52:51: GSL got Partial Bar from IQFeed
6/21/2021 11:52:51: BYDDY got Partial Bar from IQFeed
6/21/2021 11:52:51: ICON got Partial Bar from IQFeed
6/21/2021 11:52:51: INTT got Partial Bar from IQFeed
6/21/2021 11:52:51: ANAT got Partial Bar from IQFeed
6/21/2021 11:52:51: KLIC got Partial Bar from IQFeed
6/21/2021 11:52:51: POOL got Partial Bar from IQFeed
6/21/2021 11:52:51: AVID got Partial Bar from IQFeed
6/21/2021 11:52:51: ESEA got Partial Bar from IQFeed
6/21/2021 11:52:51: EBR got Partial Bar from IQFeed
6/21/2021 11:52:51: NVDA got Partial Bar from IQFeed
6/21/2021 11:52:51: OAS got Partial Bar from IQFeed
6/21/2021 11:52:51: PKI got Partial Bar from IQFeed
6/21/2021 11:52:51: BNTX got Partial Bar from IQFeed
6/21/2021 11:52:51: GNRC got Partial Bar from IQFeed
6/21/2021 11:52:51: FLWS got Partial Bar from IQFeed
6/21/2021 11:52:52: DHR got Partial Bar from IQFeed
6/21/2021 11:52:52: GATO got Partial Bar from IQFeed
6/21/2021 11:52:52: CAI got Partial Bar from IQFeed
6/21/2021 11:52:52: WST got Partial Bar from IQFeed
6/21/2021 11:52:52: ASO got Partial Bar from IQFeed
6/21/2021 11:52:52: EPAM got Partial Bar from IQFeed
6/21/2021 11:52:52: WLMS got Partial Bar from IQFeed
6/21/2021 11:52:52: ZIM got Partial Bar from IQFeed
6/21/2021 11:52:53: DSX got Partial Bar from IQFeed
6/21/2021 11:52:53: SWBI got Partial Bar from IQFeed
6/21/2021 11:52:53: CROX got Partial Bar from IQFeed
6/21/2021 11:52:53: XPEL got Partial Bar from IQFeed
6/21/2021 12:00:00: Status = Processing
6/21/2021 12:00:01: Ran Strategy on MRNA: 0 Signals, Run Time=385ms
6/21/2021 12:00:02: Ran Strategy on CTXR: 0 Signals, Run Time=382ms
6/21/2021 12:00:05: Ran Strategy on FTNT: 0 Signals, Run Time=377ms
6/21/2021 12:00:06: Ran Strategy on LDL: 0 Signals, Run Time=387ms
6/21/2021 12:00:08: Ran Strategy on SWBI: 0 Signals, Run Time=379ms
6/21/2021 12:00:12: Ran Strategy on GNRC: 0 Signals, Run Time=405ms
6/21/2021 12:00:13: Ran Strategy on POOL: 0 Signals, Run Time=402ms
6/21/2021 12:00:25: Ran Strategy on PKI: 0 Signals, Run Time=425ms
6/21/2021 12:00:30: Ran Strategy on ASO: 0 Signals, Run Time=504ms
6/21/2021 12:00:39: Ran Strategy on BNTX: 0 Signals, Run Time=442ms
6/21/2021 12:00:50: NextRun set to 6/21/2021 3:15 PM
6/21/2021 12:00:50: Status = Incomplete
6/21/2021 12:00:50: 30 Symbols not Processed: AMEH,CTSDF,ANAT,GATO,EMKR,VSTO,KLIC,BBW,EPAM,BYDDF,AVID,DHR,CAI,PRFT,GSL,ESEA,WLMS,DSX,BYDDY,EBR,FLWS,CROX,SLCT,ICON,NVDA,WST,XPEL,INTT,OAS,ZIM


0
Glitch8
 ( 11.08% )
- ago
#13
QUOTE:
Wealth-Lab appears to be keeping the first set of keys I entered.


I've verified there is a disconnect with the keys entered in the Data Manager with those of the Broker Provider for Alpaca. If you enter the keys in the Order Manager "Configure" button they will be saved. It's corrected for build 4 of the Alpaca extension, should be released along with WL7 Build 12.
1
- ago
#14
Sounds great. You guys are doing a good job responding.

Are the changes you mention going to address the issue of Strategy Monitor processing only some of the symbols in a data set ?
0
Glitch8
 ( 11.08% )
- ago
#15
No, I'm not sure yet why that's happening. It's as if the streaming from Alpaca isn't updating those symbols in a timely manner. We will need more time to investigate that.
0
- ago
#16
Isn't the streaming data coming from IQ Feed? It says that in the log pane. Makes sense to me that the data streams into our computer from IQ Feed, then WL processes it using the strategy, then any trading signals are sent to Alpaca. Therefore the issue lies with IQ Feed ?
0
Glitch8
 ( 11.08% )
- ago
#17
According to your screen capture no, the streaming data is coming from Alpaca. Notice how you selected Alpaca for Streaming. IQFeed is supplying the historical data however.
0
- ago
#18
Congrats on build 12 ! I am seeing no issues with processing symbols, so long as IQFeed is used.
0
Best Answer
- ago
#19
I guess I spoke too soon. Today I see that IQ Feed is not re-connecting:
0
Glitch8
 ( 11.08% )
- ago
#20
To me the question is why is IQFeed closing your connection. We are building in some automated reconnect logic into Build 13 but I wonder what's going on with these disconnects.

Actually it seems to be you're not the only one facing this with IQFeed, I will dig further.

http://forums.iqfeed.net/index.cfm?page=topic&topicID=3877

Here is another post that suggests the only way to overcome this is to restart IQFeed:

https://ninjatrader.com/support/forum/forum/ninjatrader-7/platform-technical-support/73695-an-existing-connection-was-forcibly-closed-by-the-remote-host
0
Cone8
 ( 4.83% )
- ago
#21
We use 2 IQFeed accounts regularly. It's happened, but I can't remember the last time that one disconnected.

This probably isn't the case because it's obvious when it happens, but fwiw, you can use IQFeed on one machine only. If you open the IQFeed client on another machine with the same account it will disconnect the first one.
0
- ago
#22
This may be helpful for you:

DTN called me because I emailed their support about some symbols not streaming in their diagnostic utility, and giving these kind of messages in the WL log pane:

6/24/2021 10:30:50: Status = Incomplete
6/24/2021 10:30:50: 1 Symbol not Processed: CTSDF


I learned the reason for some of the "not processed" messages in Wealth-Lab: some symbols are thinly traded, so there will be no trades during the bar you are trading.

1
- ago
#23
I have just changed from my paper trading Alpaca account to my real money Alpaca account. I entered the new keys. In strategy monitor the log pane shows incomplete, 29 symbols not processed. The dataset has 30 symbols with high liquidity. No other error or warning messages anywhere. I never experienced this in the paper trading account, which traded fine for over a week, with only a few symbols not processed during that time. Is this an Alpaca issue, or something else?
0
Cone8
 ( 4.83% )
- ago
#24
Although I've had a great experience using Alpaca for paper trading, I would not recommend using their intraday data for trading. I recall seeing a notification of a new Alpaca data API or version that we need to look into.

Until then, try Yahoo! streaming or another provider for intraday data in the S. Monitor.
0
- ago
#25
My intraday data is from IQFeed. Alpaca is the broker.
0

Reply

Bookmark

Sort