Gamestudio Links
Zorro Links
Newest Posts
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 827 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
IB TWS and IB api live data inaccuracy #481934
11/23/20 23:43
11/23/20 23:43
Joined: Apr 2019
Posts: 48
Albay
M
marr Offline OP
Newbie
marr  Offline OP
Newbie
M

Joined: Apr 2019
Posts: 48
Albay
I was testing the IB live data through IB api using zorro and compare the close price between TWS chart and the one printed on zorro

I came across with this result on TSLA

```
[Mon 20-11-23 20:53] (522.13)
[Mon 20-11-23 20:54] (521.96)
[Mon 20-11-23 20:55] (521.69)
[Mon 20-11-23 20:56] (521.06)
[Mon 20-11-23 20:57] (521.47)
[Mon 20-11-23 20:58] (521.49)
[Mon 20-11-23 20:59] (521.16)
Market closed on 11-23 21:00:00 (local 16:00)
Logout.. ok



On TWS chart
[Mon 20-11-23 20:53] 521.95
[Mon 20-11-23 20:54] 521.21
[Mon 20-11-23 20:55] 520.88
[Mon 20-11-23 20:56] 521.51
[Mon 20-11-23 20:57] 521.40
[Mon 20-11-23 20:58] 521.15
[Mon 20-11-23 20:59] 521.85
```

That was the last 6 one minute bars of the log as I observed that the two doesn't usually equal. Is this normal? how do I improve the live data stream on IB?

Re: IB TWS and IB api live data inaccuracy [Re: marr] #481941
11/24/20 08:39
11/24/20 08:39
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
Make sure to compare the same price. Prices can be ask, bid, or last.

Re: IB TWS and IB api live data inaccuracy [Re: jcl] #481942
11/24/20 10:03
11/24/20 10:03
Joined: Apr 2019
Posts: 48
Albay
M
marr Offline OP
Newbie
marr  Offline OP
Newbie
M

Joined: Apr 2019
Posts: 48
Albay
The printed above was for closing price, tried to use priceClose() which shows the same as default on log and compare to the close price of each candle on TWS chart on same one min timeframe.

I found out the pricetype default on IB was bid/ask how do I enforce to use the Last? to match with the IB TWS

Last edited by marr; 11/24/20 10:10.

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1