Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by M_D. 04/26/24 20:22
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 816 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Hourly data from IB #485024
01/10/22 13:41
01/10/22 13:41
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
assetHistory has a mode for hourly data, but the manual only lists Bittrex and CryptoCompare for this mode. I tried using it with IB and while it looks like it kind of works, it produces a kind of corrupt history that looks like the image below. I'm assuming this means that this feature does not properly support IB? It would be a nice option considering minute data takes a day to download for a single asset due to their API limits.

[Linked Image]

Re: Hourly data from IB [Re: MegaTanker] #485026
01/10/22 13:49
01/10/22 13:49
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
I think it's more correct to say that IB has bad historical data.

Re: Hourly data from IB [Re: MegaTanker] #485028
01/10/22 14:33
01/10/22 14:33
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
Maybe, but is it THAT bad? Even downloading something liquid like QQQ, these artifacts still exist (though they're more rare). And when viewing the graph in the TWS, the data does not have these errors.

Re: Hourly data from IB [Re: MegaTanker] #485029
01/10/22 14:56
01/10/22 14:56
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
You assume that the data displayed in TWS is the same data output by the Gateway API.

Re: Hourly data from IB [Re: MegaTanker] #485030
01/10/22 15:27
01/10/22 15:27
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline
Member
Grant  Offline
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
Andrew, would this mean that TWS (probably) has an internal data correction feature?

It's a shame that this reputable broker, which was once a front-runner in trading technology, hasn't fixed these basic issues.

Last edited by Grant; 01/10/22 15:28.
Re: Hourly data from IB [Re: MegaTanker] #485031
01/10/22 17:28
01/10/22 17:28
Joined: Apr 2008
Posts: 586
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 586
Austria
Neither bad data nor TWS correction, but IB hourly data is not probably not implemented in assetHistory. Load M1 and then convert it to H1, or post a feature request for IB H1 with assethistory.

Re: Hourly data from IB [Re: MegaTanker] #485044
01/11/22 16:43
01/11/22 16:43
Joined: Jul 2017
Posts: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
If you are at least slightly familiar with Python you can use ib_insync and its ready-to-use notebooks for basic tasks: https://nbviewer.org/github/erdewit/ib_insync/blob/master/notebooks/bar_data.ipynb

Re: Hourly data from IB [Re: MegaTanker] #485045
01/11/22 20:07
01/11/22 20:07
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
While we're on the topic the IB api... Does anyone know exactly what their BID_ASK mode returns for the Open and Close? The doc states "Time average bid" for Open and "Time average ask" for Close but I'm not sure what that means and I don't find it explained anywhere in the doc. The bars it returns look strange. See below comparison of TRADES mode vs BID_ASK mode

[Linked Image]
[Linked Image]

Re: Hourly data from IB [Re: MegaTanker] #485046
01/12/22 00:33
01/12/22 00:33
Joined: Oct 2018
Posts: 93
7
7th_zorro Offline
Junior Member
7th_zorro  Offline
Junior Member
7

Joined: Oct 2018
Posts: 93
Try this.

Outlier = 0;

Re: Hourly data from IB [Re: MegaTanker] #485047
01/12/22 01:23
01/12/22 01:23
Joined: Jul 2017
Posts: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
'Time average bid' is the average of all bids during the bar; same for asks. Similar to what Zorro delivers with price().

The bid-ask spread is negligible relative to a 1-hr high-low range - so you see these marks as almost one on the chart.

Page 1 of 2 1 2

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1