ww58
- ago
Does the demo trading works on a paper account? I test my strategies in parallel on IB and alpaca paper accounts. Alpaca is closer to the backtest. There are almost no signals on ib. I suspect this is because of the quotes. The polling method is in place.
Example for yesterday, there were signals and orders on alpaca, on backtest there were a lot of orders, none on IB. The first quotes for the backtest are also IB.

CODE:
07/14/2023 10:34:20: CNP:546 bars to 20230713 1600|Interactive Brokers 07/14/2023 10:34:20: CTLT:546 bars to 20230713 1600|Interactive Brokers 07/14/2023 10:34:20: NextRun set to 07/14/2023 16:35 07/14/2023 10:34:20: Status = Idle 07/14/2023 16:35:00: Status = Processing 07/14/2023 16:35:00: Pass 1 - Requesting updates for 50 symbols... 07/14/2023 16:35:22: Pass 1 - UpdateHistories returned 50 symbols 07/14/2023 16:35:32: Pass 2 - Requesting updates for 50 symbols... 07/14/2023 16:35:53: Pass 2 - UpdateHistories returned 4 symbols 07/14/2023 16:35:53: NextRun set to 07/14/2023 16:40 07/14/2023 16:35:53: Status = Incomplete 07/14/2023 16:35:53: No Updates for 50 Symbols: LMT,...,CTLT ... 07/14/2023 18:15:52: Status = Incomplete 07/14/2023 18:15:52: No Updates for 50 Symbols: LMT,...,CTLT 07/14/2023 18:20:00: Status = Processing 07/14/2023 18:20:00: Pass 1 - Requesting updates for 50 symbols... 07/14/2023 18:20:21: Pass 1 - UpdateHistories returned 4 symbols 07/14/2023 18:20:31: Pass 2 - Requesting updates for 50 symbols... 07/14/2023 18:20:51: Pass 2 - UpdateHistories returned 40 symbols 07/14/2023 18:20:51: NextRun set to 07/14/2023 18:25 07/14/2023 18:20:51: Status = Incomplete
0
448
Solved
11 Replies

Reply

Bookmark

Sort
Cone8
 ( 3.17% )
- ago
#1
Not enough information.
1. Are you trying to run your Paper and Live account in TWS simultaneously (the TWS API won't permit it)
2. What's your time zone so that we can make sense out of these times?
3. Are you using polling, streaming, or streaming bars?
0
ww58
- ago
#2
1. Just Paper, no live
2. GMT+3
3. Polling
0
Cone8
 ( 3.17% )
- ago
#3
Probably polling is a bad idea because it would create too many requests too quickly for IB - they will cut you off.

Use Streaming Bars.
0
ww58
- ago
#4
Streaming Bars are unavailable without a subscription. I've tried Streaming data, but there were only lines "No updates for 45 symbols". Even in the starting post it is clear that it still received quotes. It's strange why there were no signals
0
Cone8
 ( 3.17% )
- ago
#5
You can't make too many requests too quickly with IB. That's why you only get a few updates.

IB's "US Securities Snapshot and Futures Value Bundle" is $10/month, and even this fee is waived if monthly commissions reach $30. Subscribe and the problem is resolved with Streaming Bars.
0
ww58
- ago
#6
Deleted. I figured out the problem
0
ww58
- ago
#7
I've run all sorts of tests, and here's what I found:

When I run the strategy in the Strategy Monitor on 5-minute bars using Streaming Bars for a single symbol (NQ#C), everything works fine. But when I run it on a dataset, either there are no updates for all symbols, or only for one.

16.04.2025 13:56:03: Starting Streaming Bars Thread
16.04.2025 13:56:03: Populating Data
16.04.2025 13:56:03: Calling GetHistories Pass 1
16.04.2025 13:56:10: GetHistories returned with 7 symbols
16.04.2025 13:56:10: Calling GetHistories Pass 2
16.04.2025 13:56:17: GetHistories returned with 7 symbols
16.04.2025 13:56:17: ES#C 100 bars to 16.04.2025 05:55 | Interactive Brokers
16.04.2025 13:56:17: EUR#C 100 bars to 16.04.2025 05:55 | Interactive Brokers
16.04.2025 13:56:17: GC#C 100 bars to 16.04.2025 05:55 | Interactive Brokers
16.04.2025 13:56:17: CL#C 100 bars to 16.04.2025 06:55 | Interactive Brokers
16.04.2025 13:56:17: JPY#C 100 bars to 16.04.2025 05:55 | Interactive Brokers
16.04.2025 13:56:17: NQ#C 100 bars to 16.04.2025 05:55 | Interactive Brokers
16.04.2025 13:56:17: YM#C 100 bars to 16.04.2025 05:55 | Interactive Brokers
16.04.2025 13:56:17: NextRun set to 16.04.2025 14:00
16.04.2025 13:56:17: Status = Idle
16.04.2025 14:00:00: Status = Processing
16.04.2025 14:00:16: Ran Strategy on CL#C: 0 Signals, Run Time=737ms
16.04.2025 14:00:16: NextRun set to 16.04.2025 14:05
16.04.2025 14:00:16: Status = Incomplete
16.04.2025 14:00:16: No Updates for 6 Symbols: ES#C,EUR#C,GC#C,JPY#C,NQ#C,YM#C
0
Cone8
 ( 3.17% )
- ago
#8
Our documentation is very explicit about NOT USING use continuous symbols for trading. This isn't supported. Not by us. Not by IB.

Not only that, you're mixing markets in the same Strategy Monitor item. CL is on NYMEX and the index futures on CME. The Market at the bottom of the Strategy Monitor item configuration must match the market for all the symbols.
1
Best Answer
ww58
- ago
#9
Thanks for the clarification. I was aware of continuous symbols specifically for trading - I decided to test this strategy just for signaling purposes, and since continuous worked for historical data, I assumed it would work here too.

Now that I’ve switched to monthly contracts, everything is working. I wasn’t aware of the mixing markets issue, but it sounds logical.
0
Cone8
 ( 3.17% )
- ago
#10
Right. The Market selected in the configuration controls the scheduling and if the data is up-to-date. If the correct market doesn't automatically appear for your Symbol or DataSet, you should configure it manually.
0
Cone8
 ( 3.17% )
- ago
#11
The Strategy Monitor aside, it appears I introduced a bug in the IB Extension Build 67 that affects Globex contracts (like futures) when updating from a previous day. There could be some hours of missing data.

Check your IB intraday charts and make sure you have the data for the previous day's closing hour. If not, you'll need to use the Data Tool to truncate data and update again, or Refresh the chart. It may be a good idea to just Truncate date after 4/4/2025 to make sure.

We'll get a fix out ASAP.
Probably only affects Europeans or those further east. U.S. Customers were unlikely to be affected - a time zone thing.
1

Reply

Bookmark

Sort