LOCAL lcSymbol lcSymbol="IBM" PUBLIC goESignal goESignal=NEWOBJECT("IESignal.Hooks") goESignal.SetApplication ("**********") && UserID goESignal.RequestSymbol(lcSymbol,.T.) LOCAL lnHistory lnHistory=goESignal.RequestHistory(lcSymbol,"D", 1, 20, -1, -1) PUBLIC goBar as IESignal.BarData goBar=goESignal.GETBAR(lnHistory,1)The example code from the vendor was in VB. I extracted the following. It runs correctly in VB6:
Dim WithEvents eSignal As IESignal.Hooks Private Sub cmdRequestHistory_Click() Dim sLastSymbol As String Dim lHistoryHandle As Long Dim lLastHistoryCount As Long Set eSignal = New IESignal.Hooks eSignal.SetApplication ("peterbennett") Dim sSymbol As String sSymbol = "SIRI" If lHistoryHandle <> 0 Then eSignal.ReleaseHistory lHistoryHandle lHistoryHandle = 0 lLastHistoryCount = 0 End If lstHistory.Clear lHistoryHandle = eSignal.RequestHistory(sSymbol, "D", 2, 20, -1, -1) Dim BarItem As IESignal.BarData BarItem = eSignal.GetBar(lHistoryHandle, -10) Dim sRet As String sRet = Str$(BarItem.dtTime) sRet = sRet + ": " + Str$(BarItem.dOpen) sRet = sRet + ", " + Str$(BarItem.dHigh) sRet = sRet + ", " + Str$(BarItem.dLow) sRet = sRet + ", " + Str$(BarItem.dClose) Text1.Text = sRet End SubThe structure I'm trying to get back is of type IESignal.BarData
Bar Time datetime Open double High double Low double Close double Volume double Open Interest double Bar Flags bit Bid double Ask double Trade doubleThanks