We apologize for the inconvenience you have run into this particular coding sample and hopefully the information provided below would help.
It is my understanding that you were trying to obtain the last tick information via the time&sales data. Is this correct?
If you are interested in obtaining time&sales updates from the time you requested the data, you should look at the DESKTOP_VB_SAMPLE instead.
You can particularly look at esignal_OnTimeSalesChanged in frmTickData.frm in terms how to process the last tick information.
See code snippet below:
Private Sub esignal_OnTimeSalesChanged(ByVal tsHandle As Long)
If requestHandle = tsHandle Then
'lHandle is the handle to the time sales request that requested
'this data
Dim lNumBars, lNumRtBars, lBar, lDiff As Long
Dim item As IESignal.TimeSalesData
lNumRtBars = esignal.GetNumTimeSalesRtBars(tsHandle) 'Gets number of
'real-time bars
'Determine the number of new bars since the last event
lDiff = (lNumRtBars - lLastTsRtCount) * -1
For lBar = lDiff + 1 To 0
item = esignal.GetTimeSalesBar(tsHandle, lBar) 'Gets a TimeSalesData structure.
If item.DataType = tsdBID Then
'Extract fields from TimeSalesData structure.
List1.AddItem sBar, 0
Next lBar
'Remember the number of real-time bars so you can track how many
'new real-time bars occur the next time.
lLastTsRtCount = lNumRtBars
End If
End Sub
P.S. We are currently looking into the Time And Sales in VB.zip coding sample for potential problems. We will update you when we have more findings.
In terms of obtaining support for the Desktop API, you can actually email us by visiting the following form.
It is my understanding that you were trying to obtain the last tick information via the time&sales data. Is this correct?
If you are interested in obtaining time&sales updates from the time you requested the data, you should look at the DESKTOP_VB_SAMPLE instead.
You can particularly look at esignal_OnTimeSalesChanged in frmTickData.frm in terms how to process the last tick information.
See code snippet below:
Private Sub esignal_OnTimeSalesChanged(ByVal tsHandle As Long)
If requestHandle = tsHandle Then
'lHandle is the handle to the time sales request that requested
'this data
Dim lNumBars, lNumRtBars, lBar, lDiff As Long
Dim item As IESignal.TimeSalesData
lNumRtBars = esignal.GetNumTimeSalesRtBars(tsHandle) 'Gets number of
'real-time bars
'Determine the number of new bars since the last event
lDiff = (lNumRtBars - lLastTsRtCount) * -1
For lBar = lDiff + 1 To 0
item = esignal.GetTimeSalesBar(tsHandle, lBar) 'Gets a TimeSalesData structure.
If item.DataType = tsdBID Then
'Extract fields from TimeSalesData structure.
List1.AddItem sBar, 0
Next lBar
'Remember the number of real-time bars so you can track how many
'new real-time bars occur the next time.
lLastTsRtCount = lNumRtBars
End If
End Sub
P.S. We are currently looking into the Time And Sales in VB.zip coding sample for potential problems. We will update you when we have more findings.
In terms of obtaining support for the Desktop API, you can actually email us by visiting the following form.
Comment