- ago
I get the following errors when I run a strategy standalone and then try to place an option trade from the Signals or Orders windows to WL Dummy Broker. If I first stage and then try to place trade from Orders window, I get the error shown in the attached image. If I try to place directly from Signals window, I get an error message in the Order window "FinalOrder" and the Place Trade function is not selectable.
0
738
35 Replies

Reply

Bookmark

Sort
- ago
#1
0
- ago
#2
I am using compressed daily data from IB 30 min bars. Signal is accurate and opt symbol is valid.
0
Cone8
 ( 24.10% )
- ago
#3
This is understandable because quotes for the dummy broker come from Partial Daily bar requests. The problem is that IB doesn't support Daily scale data requests for options.

I don't think we can make a change to the Dummy Broker just to accommodate this IB options scenario. Instead, I encourage you to use an IB Paper Account for paper trading options or otherwise.
0
- ago
#4
OK, I understand. I can do that.

As I recall, IB Dummy account cannot be used at the same time as a live account with TWS. This creates a challenge as I am using IB Greeks to select option trade strikes, but they only seem to work during market hours. I am also using TWS during market hours. Makes development testing challenging. Open to any ideas you may have as workaround for this conflict.

One question: How does WL know what broker to use when a standalone strategy is run? Is it whatever is set in the Order Manager as the broker when the strategy is run? (I.e., not a setting or preference, nor programmatic.)
0
Cone8
 ( 24.10% )
- ago
#5
Those were two questions :)

QUOTE:
One question: How does WL know what broker to use when a standalone strategy is run?
You select the broker and account on any tool that generates signals.

QUOTE:
Is it whatever is set in the Order Manager as the broker when the strategy is run?
No, see above. However, the last broker you select in the Order Manager is the default for the other tools. Also, the broker/account in the Order Manager is the destination for manual trades from the order ticket.

It turns out that it wasn't hard to make an exception for "option symbol + IB Provider" in the Dummy Broker. It's ready for Build 50. For it to work, IB must be the provider for streaming quotes selected in the Order Manager (as it was in your image above).
0
- ago
#6
That's great! What's the guesstimate on B50 release date?
0
Cone8
 ( 24.10% )
- ago
#7
It's up to Glitch, but I don't see any earth-shattering changes yet, so probably within 2 weeks.
0
- ago
#8
Thank you
0
- ago
#9
I am still having this problem with the Dummy Broker. Occasionally it works but mostly fails like this.

0
Cone8
 ( 24.10% )
- ago
#10
It will work if the contract has traded. For best results you show choose "Midpoint" for "Option Chart: What to request".



Make sure you can get a 30-minute chart. If you can't get that, it won't work because IB isn't returning the data.

0
Cone8
 ( 24.10% )
- ago
#11
Note!
Once a provider fails to get data for a symbol-scale, it won't be requested again for that Provider. To try again you have to "Clear Internal Tracking Requests" for the provider or restart WL.
0
- ago
#12
QUOTE:
It will work if the contract has traded.

Do you mean that day or ever? And what happens if it hasn't? Will it recover when run on next bar or is the symbol "blacklisted?"

QUOTE:
For best results you show choose "Midpoint" for "Option Chart: What to request".

That's what it's set for.

QUOTE:
Make sure you can get a 30-minute chart.

I can.

QUOTE:
Once a provider fails to get data for a symbol-scale, it won't be requested again for that Provider. To try again you have to "Clear Internal Tracking Requests" for the provider or restart WL.

No way to reset this programmatically?
0
Glitch8
 ( 12.85% )
- ago
#13
Yes there is:

CODE:
DataProviderBase dp = DataProviderFactory.Instance.Find("Interactive Brokers"); dp.ClearRequestLists();
0
Cone8
 ( 24.10% )
- ago
#14
QUOTE:
Do you mean that day or ever?
In the last 30 minutes because that's the data we're requesting. IB only returns intraday data for options, so the best shot to get a quote is with the 30 minute bar.

QUOTE:
And what happens if it hasn't?
If using Midpoint Bid/Ask, it shouldn't matter if the contract is actively trading - there should be data throughout the day when the first bid/ask appears.

I don't know what to tell you. It's working fine for me (even too well by filling a few minutes after the close).

0
- ago
#15
QUOTE:
Yes there is:

Excellent. Thanks. Not clear yet if this is the cause of my problem.
0
- ago
#16
QUOTE:
It's working fine for me (even too well by filling a few minutes after the close).


That answers the next question I was going to ask. I can't believe this is normal. I am getting data access errors all over the place. Here's a snippet from the log last run of the day. Can you see something that looks like I am requesting data the wrong way? These are valid symbols that are actively trading.

QUOTE:
"11/7/2023 12:57:11:299" "Interactive Brokers" "SNAP 231215C00010000: Daily bars are not available for Option contracts"
"11/7/2023 12:57:09:944" "InteractiveBrokers" "366: No historical data query found for ticker id:43333"
"11/7/2023 12:57:09:942" "Interactive Brokers" "Request for: SNAP231215C10, 2 D, 30 mins data Timed Out"
"11/7/2023 12:56:59:011" "Yahoo! Finance" "Connected"
"11/7/2023 12:56:29:934" "InteractiveBrokers" "366: No historical data query found for ticker id:43332"
"11/7/2023 12:56:29:932" "Interactive Brokers" "Request for: SNAP231215C10, 2 D, 30 mins data Timed Out"
"11/7/2023 12:55:48:592" "InteractiveBrokers" "366: No historical data query found for ticker id:43331"
"11/7/2023 12:55:48:590" "Interactive Brokers" "Request for: SLV231215C20, 2 D, 30 mins data Timed Out"
"11/7/2023 12:55:08:588" "InteractiveBrokers" "366: No historical data query found for ticker id:43330"
"11/7/2023 12:55:08:583" "Interactive Brokers" "Request for: SLV231215C20, 2 D, 30 mins data Timed Out"
"11/7/2023 12:55:01:728" "Interactive Brokers" "Connected"
"11/7/2023 12:54:23:817" "Interactive Brokers" "EWZ 231215C00031000: Daily bars are not available for Option contracts"
"11/7/2023 12:54:22:458" "InteractiveBrokers" "366: No historical data query found for ticker id:43329"
"11/7/2023 12:54:22:455" "Interactive Brokers" "Request for: EWZ231215C31, 2 D, 30 mins data Timed Out"
"11/7/2023 12:53:42:448" "InteractiveBrokers" "366: No historical data query found for ticker id:43328"
"11/7/2023 12:53:42:446" "Interactive Brokers" "Request for: EWZ231215C31, 2 D, 30 mins data Timed Out"
"11/7/2023 12:53:36:295" "InteractiveBrokers" "2108: Market data farm connection is inactive but should be available upon demand.usopt"
"11/7/2023 12:52:57:210" "Interactive Brokers" "DIS 231215C00080000: Daily bars are not available for Option contracts"
"11/7/2023 12:52:55:879" "InteractiveBrokers" "366: No historical data query found for ticker id:43327"
"11/7/2023 12:52:55:877" "Interactive Brokers" "Request for: DIS231215C80, 2 D, 30 mins data Timed Out"
"11/7/2023 12:52:15:870" "InteractiveBrokers" "366: No historical data query found for ticker id:43326"
"11/7/2023 12:52:15:868" "Interactive Brokers" "Request for: DIS231215C80, 2 D, 30 mins data Timed Out"
0
Cone8
 ( 24.10% )
- ago
#17
All of the requests were returned with a 366 error - the IB documentation for that code is "Historical market data request with this ticker id has either been cancelled or is not found.".

The only thing I can think of is that IB will cut you off if you request too much data. However, we throttle the requests in an attempt to prevent requesting "too much, too fast".

Do other IB chart requests work when this occurs?
0
- ago
#18
From the Order Manager page, I was able to right-click on these unfilled (Error) contracts and select "Place" and they filled immediately and appeared in the Dummy Account. It was almost 6 PM market time when I did this, so we might have been in extended market hours.

Does this shed any light on what might be going on?

0
- ago
#19
QUOTE:
The only thing I can think of is that IB will cut you off if you request too much data.


I don't think I'm requesting historical data after the trade is pended but I'm assuming the Order manager must be, maybe in order to get a contract price to set quantity? Could that be more than 13 bars of 30 min data?

Is there a limit to how many requests of unique contracts you can make per minute, in addition to the # of bars?

I'm wondering if this is a quirk because it's a WL Dummy Account. Maybe it has something to do with the immediate fill which is not real world? I will try with run IB dummy tomorrow.

QUOTE:
Do other IB chart requests work when this occurs?

Since the Oder Manger is triggering the fill, I'm not sure exactly when it happens, but I can try this when I see another Order Manager error. I tried this a few minutes ago on the problem contracts and I got data immediately in a chart. But we are outside of regular market hours, and I don't know if that is a factor in this.
0
Cone8
 ( 24.10% )
- ago
#20
If you want something close to real world, use the IB Paper Account.

The dummy broker just [periodically] requests the last partial bar of data (which you can see in your error log actually results in a 2-day request of 30-minute bars) compares the last price to the order, and fills if it should.

The reason it didn't work for you is because IB wasn't returning the data. It tries twice, gives up on the intraday request, and then the dummy broker switches to attempt to get daily bars - and daily bar requests will always fail for IB options.

We can't control the data from the provider. And since it works me [almost] every time I've tried, there's nothing I can see to make it work better/differently.
0
- ago
#21
Wow. Thanks for figuring that one out. I have a couple of questions.

1. Would switching from 30 min/Polling to 30 min/Streaming potentially avoid this situation or is that irrelevant? (I'm thinking get away from using streaming bars).

2. I am trading options based on underlying signals (Daily data compressed from 30 min). The underlying symbol is what is in the DataSet. When you mentioned that WL tracks "bad" symbols, if the bad symbol is the option contract does it store the option contract, or the active symbol being executed (I.e. the underlying in the DataSet)?
0
Cone8
 ( 24.10% )
- ago
#22
1. No. The dummy broker is creating the request to get partial bar data from the selected Streaming Provider's companion Historical provider. It's a general solution that uses the provider selected in the Orders Manager. Streaming is not involved to fill Dummy Broker orders.

Re: (I'm thinking get away from using streaming bars)
Bad thinking. Streaming bars will give you almost precisely the same bars you'll get with a history request later. If you want to come close to matching a backtest, you need Streaming Bars.

Anyway, the request for a secondary symbol from the underlying streaming chart will always be a history request.

2. If a provider doesn't return data for a symbol+scale request, it's goes on the black list for that provider. "symbol" can be an option, stock, future, etc. and doesn't have to be the primary symbol.
0
- ago
#23
I am running in the IB Dummy Broker this morning. On the first valid bar (7:00 AM PT, 10:00 market time) run the strategy ran mainly successfully and placed multiple trades in the IB Dummy Broker. On the next bar run 30 min later I started to get these failures again.

QUOTE:
Timestamp Source Message Exception
"11/9/2023 07:59:22:317" "InteractiveBrokers" "366: No historical data query found for ticker id:3273"
"11/9/2023 07:59:22:316" "Interactive Brokers" "Request for: GOOGL, 2 D, 30 mins data Timed Out"
"11/9/2023 07:58:42:308" "InteractiveBrokers" "366: No historical data query found for ticker id:3272"
"11/9/2023 07:58:42:308" "Interactive Brokers" "Request for: AMD, 2 D, 30 mins data Timed Out"
"11/9/2023 07:58:02:307" "InteractiveBrokers" "366: No historical data query found for ticker id:3271"
"11/9/2023 07:58:02:305" "Interactive Brokers" "Request for: INTC, 2 D, 30 mins data Timed Out"
"11/9/2023 07:57:22:295" "InteractiveBrokers" "366: No historical data query found for ticker id:3270"
"11/9/2023 07:57:22:293" "Interactive Brokers" "Request for: EWZ, 2 D, 30 mins data Timed Out"
"11/9/2023 07:56:42:283" "InteractiveBrokers" "366: No historical data query found for ticker id:3269"
"11/9/2023 07:56:42:282" "Interactive Brokers" "Request for: XOM, 2 D, 30 mins data Timed Out"
"11/9/2023 07:56:02:279" "InteractiveBrokers" "366: No historical data query found for ticker id:3268"
"11/9/2023 07:56:02:277" "Interactive Brokers" "Request for: MU, 2 D, 30 mins data Timed Out"
"11/9/2023 07:55:22:267" "InteractiveBrokers" "366: No historical data query found for ticker id:3267"
"11/9/2023 07:55:22:266" "Interactive Brokers" "Request for: PLTR, 2 D, 30 mins data Timed Out"
"11/9/2023 07:54:42:262" "InteractiveBrokers" "366: No historical data query found for ticker id:3266"
"11/9/2023 07:54:42:261" "Interactive Brokers" "Request for: EFA, 2 D, 30 mins data Timed Out"
"11/9/2023 07:54:02:254" "InteractiveBrokers" "366: No historical data query found for ticker id:3265"
"11/9/2023 07:54:02:253" "Interactive Brokers" "Request for: MSFT, 2 D, 30 mins data Timed Out"
"11/9/2023 07:53:22:250" "InteractiveBrokers" "366: No historical data query found for ticker id:3264"
"11/9/2023 07:53:22:248" "Interactive Brokers" "Request for: JPM, 2 D, 30 mins data Timed Out"
"11/9/2023 07:52:42:241" "InteractiveBrokers" "366: No historical data query found for ticker id:3263"
"11/9/2023 07:52:42:240" "Interactive Brokers" "Request for: UBER, 2 D, 30 mins data Timed Out"
"11/9/2023 07:52:02:239" "InteractiveBrokers" "366: No historical data query found for ticker id:3262"
"11/9/2023 07:52:02:237" "Interactive Brokers" "Request for: CCL, 2 D, 30 mins data Timed Out"
"11/9/2023 07:51:22:237" "InteractiveBrokers" "366: No historical data query found for ticker id:3261"
"11/9/2023 07:51:22:237" "Interactive Brokers" "Request for: KWEB, 2 D, 30 mins data Timed Out"
"11/9/2023 07:50:42:234" "InteractiveBrokers" "366: No historical data query found for ticker id:3260"
"11/9/2023 07:50:42:233" "Interactive Brokers" "Request for: PYPL, 2 D, 30 mins data Timed Out"
"11/9/2023 07:50:02:224" "InteractiveBrokers" "366: No historical data query found for ticker id:3259"
"11/9/2023 07:50:02:222" "Interactive Brokers" "Request for: RIOT, 2 D, 30 mins data Timed Out"
"11/9/2023 07:49:22:218" "InteractiveBrokers" "366: No historical data query found for ticker id:3258"
"11/9/2023 07:49:22:216" "Interactive Brokers" "Request for: XBI, 2 D, 30 mins data Timed Out"
"11/9/2023 07:48:42:212" "InteractiveBrokers" "366: No historical data query found for ticker id:3257"
"11/9/2023 07:48:42:211" "Interactive Brokers" "Request for: PLUG, 2 D, 30 mins data Timed Out"
"11/9/2023 07:48:02:211" "InteractiveBrokers" "366: No historical data query found for ticker id:3256"
"11/9/2023 07:48:02:210" "Interactive Brokers" "Request for: JD, 2 D, 30 mins data Timed Out"
"11/9/2023 07:47:22:017" "InteractiveBrokers" "366: No historical data query found for ticker id:3254"
"11/9/2023 07:47:22:016" "Interactive Brokers" "Request for: SHOP, 2 D, 30 mins data Timed Out"
"11/9/2023 07:46:42:015" "InteractiveBrokers" "366: No historical data query found for ticker id:3253"
"11/9/2023 07:46:42:013" "Interactive Brokers" "Request for: ENPH, 2 D, 30 mins data Timed Out"
"11/9/2023 07:46:02:011" "InteractiveBrokers" "366: No historical data query found for ticker id:3252"
"11/9/2023 07:46:02:009" "Interactive Brokers" "Request for: WFC, 2 D, 30 mins data Timed Out"
"11/9/2023 07:45:22:008" "InteractiveBrokers" "366: No historical data query found for ticker id:3251"
"11/9/2023 07:45:22:007" "Interactive Brokers" "Request for: XLF, 2 D, 30 mins data Timed Out"
"11/9/2023 07:44:42:002" "InteractiveBrokers" "366: No historical data query found for ticker id:3250"
"11/9/2023 07:44:42:002" "Interactive Brokers" "Request for: AMZN, 2 D, 30 mins data Timed Out"
"11/9/2023 07:44:01:997" "InteractiveBrokers" "366: No historical data query found for ticker id:3249"
"11/9/2023 07:44:01:995" "Interactive Brokers" "Request for: NFLX, 2 D, 30 mins data Timed Out"
"11/9/2023 07:43:21:987" "InteractiveBrokers" "366: No historical data query found for ticker id:3248"
"11/9/2023 07:43:21:985" "Interactive Brokers" "Request for: AAPL, 2 D, 30 mins data Timed Out"
"11/9/2023 07:42:41:983" "InteractiveBrokers" "366: No historical data query found for ticker id:3247"
"11/9/2023 07:42:41:981" "Interactive Brokers" "Request for: ARKK, 2 D, 30 mins data Timed Out"
"11/9/2023 07:42:01:976" "InteractiveBrokers" "366: No historical data query found for ticker id:3246"
"11/9/2023 07:42:01:974" "Interactive Brokers" "Request for: C, 2 D, 30 mins data Timed Out"
"11/9/2023 07:41:21:967" "InteractiveBrokers" "366: No historical data query found for ticker id:3245"
"11/9/2023 07:41:21:966" "Interactive Brokers" "Request for: ORCL, 2 D, 30 mins data Timed Out"
"11/9/2023 07:40:41:959" "InteractiveBrokers" "366: No historical data query found for ticker id:3244"
"11/9/2023 07:40:41:957" "Interactive Brokers" "Request for: SNAP, 2 D, 30 mins data Timed Out"
"11/9/2023 07:40:01:957" "InteractiveBrokers" "366: No historical data query found for ticker id:3243"
"11/9/2023 07:40:01:955" "Interactive Brokers" "Request for: BA, 2 D, 30 mins data Timed Out"
"11/9/2023 07:39:21:953" "InteractiveBrokers" "366: No historical data query found for ticker id:3242"
"11/9/2023 07:39:21:951" "Interactive Brokers" "Request for: LCID, 2 D, 30 mins data Timed Out"
"11/9/2023 07:38:41:946" "InteractiveBrokers" "366: No historical data query found for ticker id:3241"
"11/9/2023 07:38:41:945" "Interactive Brokers" "Request for: KRE, 2 D, 30 mins data Timed Out"
"11/9/2023 07:38:01:945" "InteractiveBrokers" "366: No historical data query found for ticker id:3240"
"11/9/2023 07:38:01:943" "Interactive Brokers" "Request for: GLD, 2 D, 30 mins data Timed Out"
"11/9/2023 07:37:21:941" "InteractiveBrokers" "366: No historical data query found for ticker id:3239"
"11/9/2023 07:37:21:939" "Interactive Brokers" "Request for: ROKU, 2 D, 30 mins data Timed Out"
"11/9/2023 07:36:41:934" "InteractiveBrokers" "366: No historical data query found for ticker id:3238"
"11/9/2023 07:36:41:932" "Interactive Brokers" "Request for: F, 2 D, 30 mins data Timed Out"
"11/9/2023 07:36:01:933" "InteractiveBrokers" "366: No historical data query found for ticker id:3237"
"11/9/2023 07:36:01:930" "Interactive Brokers" "Request for: JNJ, 2 D, 30 mins data Timed Out"
"11/9/2023 07:35:21:923" "InteractiveBrokers" "366: No historical data query found for ticker id:3236"
"11/9/2023 07:35:21:921" "Interactive Brokers" "Request for: TLT, 2 D, 30 mins data Timed Out"
"11/9/2023 07:34:41:919" "InteractiveBrokers" "366: No historical data query found for ticker id:3235"
"11/9/2023 07:34:41:918" "Interactive Brokers" "Request for: AI, 2 D, 30 mins data Timed Out"
"11/9/2023 07:34:01:911" "InteractiveBrokers" "366: No historical data query found for ticker id:3234"
"11/9/2023 07:34:01:900" "Interactive Brokers" "Request for: GM, 2 D, 30 mins data Timed Out"
"11/9/2023 07:33:21:900" "InteractiveBrokers" "366: No historical data query found for ticker id:3233"
"11/9/2023 07:33:21:898" "Interactive Brokers" "Request for: VZ, 2 D, 30 mins data Timed Out"
"11/9/2023 07:32:41:896" "InteractiveBrokers" "366: No historical data query found for ticker id:3232"
"11/9/2023 07:32:41:894" "Interactive Brokers" "Request for: COIN, 2 D, 30 mins data Timed Out"
"11/9/2023 07:32:01:892" "InteractiveBrokers" "366: No historical data query found for ticker id:3231"
"11/9/2023 07:32:01:890" "Interactive Brokers" "Request for: BAC, 2 D, 30 mins data Timed Out"
"11/9/2023 07:31:21:885" "InteractiveBrokers" "366: No historical data query found for ticker id:3230"
"11/9/2023 07:31:21:883" "Interactive Brokers" "Request for: MARA, 2 D, 30 mins data Timed Out"
"11/9/2023 07:30:41:876" "InteractiveBrokers" "366: No historical data query found for ticker id:3229"
"11/9/2023 07:30:41:875" "Interactive Brokers" "Request for: HYG, 2 D, 30 mins data Timed Out"


It looks like I'm getting a system error when it is trying to update the primary symbols with 30 min data. Looks a lot like the same error I was getting when running with the WL Dummy Broker. I would appreciate your insight in whether this looks like the same problem.

I cleared tracking data, but it didn't make any difference.

QUOTE:
Do other IB chart requests work when this occurs?

No. In fact it looks like WL is locked up (spinning wheel on screen and mostly unresponsive to mouse).

I had to force close WL and restarted. It's running without error now on the next bar.
0
Cone8
 ( 24.10% )
- ago
#24
Same answer as before. If IB doesn't return the data, there's nothing we can do.

QUOTE:
No. In fact it looks like WL is locked up (spinning wheel on screen and mostly unresponsive to mouse).
What else is going on there? What else is running? What else is using IB data?

IB is a BAD data provider choice if you need a lot of data.
Requests are synchronous, WealthLab throttles the requests so you don't get cut off, but IB can take minutes to return even 1000 bars of data.
0
- ago
#25
QUOTE:
IB is a BAD data provider choice if you need a lot of data.

It seems I don't have a choice if I want to use the special methods supported only by IB for options, including finding options and greeks. These functions must use IB data, right? Or am I missing something? I can get option pricing and historical intraday data from TDA if it would work with these special functions.

I don't really need a lot of data. I think it's these special API function calls where it's getting hung up. Although it may be refreshing data for 5 mos of 30-min bars as part of the strategy. However, the max update data requested would only be one bar per symbol unless that's an overly simplistic assumption.
QUOTE:
What else is going on there? What else is running? What else is using IB data?

I don't think there's anything else running. None of my other strategies use intraday or daily IB data and if they did, they wouldn't be running at the same time.

I am now going to shut down IB Real and go IB Dummy for additional testing. I normally am doing live trading using TWS but unfortunately, I'll have to forgo that today as IB won't let Paper and Real Accounts to be active at same time with TWS, as you know. And IB option functions won't work when the market's closed so I can only test during market hours.
0
Cone8
 ( 24.10% )
- ago
#26
I don't know why IB is failing your requests for data.
Anyway, you'll see that if you don't rely on the dummy broker to request even more data to fill orders, there will be no issue.
0
- ago
#27
Is it true that there is no way to get away from IB data if I want to auto-trade options?
0
Cone8
 ( 24.10% )
- ago
#28
What do you mean, exactly?

Because you don't need any data to Auto-Trade options with a real broker.

But you need data if you want to fake trade options with the Dummy Broker.
0
- ago
#29
I meant end-to-end auto-trading of options. I know that IB is the only broker currently that will trade options via API. Below is what I wrote in Post #25, which may clarify my question.

QUOTE:
It seems I don't have a choice if I want to use the special methods supported only by IB for options, including finding options and greeks. These functions must use IB data, right? Or am I missing something? I can get option pricing and historical intraday data from TDA if it would work with these special functions.


For example, I assume I could use TDA intraday data for the Primary symbol but IB is the only broker that supports functions I require, like finding a symbol and supplying Greeks. Is that correct?
0
Cone8
 ( 24.10% )
- ago
#30
It does works end-to-end. The only problem is that we can't tell why IB is not returning data to you.

QUOTE:
I know that IB is the only broker currently that will trade options via API.
You can trade options via API with Tradier and TDA too, but Tradier only provides daily data and the TDA provider none. You can also use IQFeed an options provider for any of the brokers (prices only, and you'd have to do a lot of symbol mapping).

QUOTE:
It seems I don't have a choice if I want to use the special methods supported only by IB for options, including finding options and greeks.
Tradier supports greeks, updated only once each hour. When Schwab comes online, we'll see what they have to offer.
0
- ago
#31
I am getting this same error (only sometimes) when running in a Strategy Window (SW). Since I have the IB Dummy set as the account in the Order Manager window, wouldn't that eliminate WL Dummy as a culprit? Or does running a strategy in SW use WL Dummy Broker by default?

I contacted the IB API support department, and the tech thought the error was a "pacing violation" (although I think he was guessing). He shared the IB limits on historical data fetch with me, documented here: https://interactivebrokers.github.io/tws-api/historical_limitations.html

I am surprised how restrictive they are. I am updating 60+ primary symbols every 30 min. I am also making multiple Greek calls on a given primary. This is how I probe for valid strikes and the increment to use for the particular option expiration. I'm wondering if I should put a delay in the code before processing a new underlying symbol. Have you seen any previous situations like this? (Greeks support is new to WL, so that may be a silly question, but I wonder if there are some secret pacing limits to fetching Greeks.)

ADDENDUM
I just realized that linked IB doc says the Pacing limit is only for 30 sec data or less so maybe it does have something to do with the Greek fetches.
0
Cone8
 ( 24.10% )
- ago
#32
QUOTE:
am updating 60+ primary symbols every 30 min.
This alone is a mistake mid-market unless you're using Streaming or Streaming bars. In other words, you just can't go polling at IB 60 times all at once and expect to get data back. And, then you're adding other requests for options data. It just ain't going to happen with IB.

You don't have to look any further than the top of the page for the link you just posted - and just ignore "(30 seconds or less)" - it applies to all requests.
0
- ago
#33
I'm still getting data timeouts running with either streaming data or streaming bars (30 min). Based on what you believe is going on, do you suggest I put a delay in the execute method to slow down the processing of symbols? Or would that not affect how the SM works? (II understand the SM opens multiple data requests at once in the DataSet, to improve performance, unlike SW?)
0
Cone8
 ( 24.10% )
- ago
#34
Data timeouts with Streaming Bars? Streaming Bars don't time out. Do you mean the strategy is taking too long due to the requests for options data and greeks?

You're not going to get data polling for 60 symbols in any reasonable amount of time. It takes too many requests.

My suggestion would be try with a small number of symbols first, like 2 or 3, to prove that it works. Streaming Bars for the underlying symbol is the right way to go so you're not polling for that data too.

If that works, you can try increasing the symbol count until it "breaks". Finally, then work on the logic to eliminate requests that are unlikely to result in a trading action.
0
- ago
#35
Good suggestion. I'll work on it. Thank you.
0

Reply

Bookmark

Sort