I tried to copy the code out of the book and all I get is lots of bars with 12AM for the time and zeros for everyting else. Is there a scope/timing issue with my esignal variables. Seems strange that you don't do a set after demensioning the variable.
Private Sub cmdBrut_Click()
Dim oFilter As IESignal.TimeSalesFilter
With oFilter
.sSymbol = "DELL"
.bQuotes = True
.bTrades = True
.lNumDays = 1
.bFilterPrice = False
.bFilterVolume = False
.bFilterQuoteExchanges = False
.bFilterTradeExchanges = False
End With
mbBrutMode = True
mlBrutHandle = moEsig.RequestTimeSales(oFilter)
Me.txtResults = Me.txtResults & vbLf & "Init. Handle=" & CStr(mlBrutHandle)
mlBrutCount = 0
End Sub
Private Sub moEsig_OnTimeSalesChanged(ByVal lHandle As Long)
If mbBrutMode = True Then
mlBrutCount = mlBrutCount + 1
Me.txtResults = Me.txtResults & vbLf & "Brut Count=" & CStr(mlBrutCount) & " Handle=" & CStr(lHandle)
End If
HandleTimeSales lHandle
End Sub
Private Sub HandleTimeSales(ByVal lHandle As Long)
'mlHandleList to be implemented later
Dim oData As IESignal.TimeSalesData
Dim lNumBars As Long
Dim lBar As Long
Dim lDiff As Long
Dim lk As Long
Dim sLine As String
Dim sResults() As String
Const iLimit As Integer = 10 'temporary for debugging
lNumBars = moEsig.GetNumTimeSalesBars(lHandle)
Me.txtBarCount = Format(lNumBars, "#,##0")
If lNumBars > 0 Then
ReDim sResults(1 To lNumBars)
For lk = 1 To lNumBars
oData = moEsig.GetTimeSalesBar(lHandle, lk)
With oData
sLine = CStr(.DataType) & vbTab
sLine = sLine & CStr(.dtTime) & vbTab
sLine = sLine & CStr(.dPrice) & vbTab
sLine = sLine & CStr(.lSize) & vbTab
sLine = sLine & CStr(.sExchange) & vbTab
sLine = sLine & CStr(.lFlags)
End With
sResults(lk) = sLine
If lk < iLimit Then
Me.txtResults = Me.txtResults & vbLf & sLine
End If
Next lk
End If
End Sub
Private Sub cmdBrut_Click()
Dim oFilter As IESignal.TimeSalesFilter
With oFilter
.sSymbol = "DELL"
.bQuotes = True
.bTrades = True
.lNumDays = 1
.bFilterPrice = False
.bFilterVolume = False
.bFilterQuoteExchanges = False
.bFilterTradeExchanges = False
End With
mbBrutMode = True
mlBrutHandle = moEsig.RequestTimeSales(oFilter)
Me.txtResults = Me.txtResults & vbLf & "Init. Handle=" & CStr(mlBrutHandle)
mlBrutCount = 0
End Sub
Private Sub moEsig_OnTimeSalesChanged(ByVal lHandle As Long)
If mbBrutMode = True Then
mlBrutCount = mlBrutCount + 1
Me.txtResults = Me.txtResults & vbLf & "Brut Count=" & CStr(mlBrutCount) & " Handle=" & CStr(lHandle)
End If
HandleTimeSales lHandle
End Sub
Private Sub HandleTimeSales(ByVal lHandle As Long)
'mlHandleList to be implemented later
Dim oData As IESignal.TimeSalesData
Dim lNumBars As Long
Dim lBar As Long
Dim lDiff As Long
Dim lk As Long
Dim sLine As String
Dim sResults() As String
Const iLimit As Integer = 10 'temporary for debugging
lNumBars = moEsig.GetNumTimeSalesBars(lHandle)
Me.txtBarCount = Format(lNumBars, "#,##0")
If lNumBars > 0 Then
ReDim sResults(1 To lNumBars)
For lk = 1 To lNumBars
oData = moEsig.GetTimeSalesBar(lHandle, lk)
With oData
sLine = CStr(.DataType) & vbTab
sLine = sLine & CStr(.dtTime) & vbTab
sLine = sLine & CStr(.dPrice) & vbTab
sLine = sLine & CStr(.lSize) & vbTab
sLine = sLine & CStr(.sExchange) & vbTab
sLine = sLine & CStr(.lFlags)
End With
sResults(lk) = sLine
If lk < iLimit Then
Me.txtResults = Me.txtResults & vbLf & sLine
End If
Next lk
End If
End Sub
Comment