开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Help for an old coder. API 10.17 Bar class.


 

Hello,
This looks odd but I have been using the IB API on Visual Basic 6 forever.
I have an app that collects data, historical and put orders in the market and works great.
I saw this new API 10.17 and as I always do I try it to see what will happen.
It is broken now, I did look on the forum here trying to find something about it but could not find.
?
Problem is on this new Bar class.
For example on the Api 9.7X the function like historicalData would return (ByVal reqId As Long, ByVal date1 As String, ByVal open1 As Double, ByVal high As Double, ByVal low As Double, ByVal close1 As Double, ByVal volume As Long, ByVal barCount As Long, ByVal WAP As Double, ByVal hasGaps As Long)
?
Using API 10.17 when I go to the events list and select historicalData event it show a broken all in red historicalData(ByVal reqId As Long, ByVal date1 As String, ByVal open1 As Double, ByVal high As Double, ByVal low As Double, ByVal close1 As Double, ByVal volume As Long, ByVal barCount As Long, ByVal WAP As Double, ByVal hasGaps As Long)
?
There is nothing with Bar. Naturally the code does not work.
?
The API documentation shows the historicalData event as void historicalData(int reqid, Bar bar)
?
I change the event return to historicalData(ByVal reqId As Long, bar1 as Bar), the red disappear, but I cannot find class bar in the API.
?
For example on contract I use IContract and then the function createContract to create and and use that contract class.
?
On Bar I cannot find nothing for BAr inside the API.
?
I try to create a Bar class inside the VB code with the definition on the API documentation but naturally it did not work, I think I need to use the Bar class from the API, but do not see how to get it.
?
Anyone has any clue what is going on here?
I know that is not much information but maybe someone had to deal with something similar.
?
Thank you
?

Join [email protected] to automatically receive all group messages.