I am collecting intraday historical data everday after market close.
Data from 9:30 - 10:30 is missing!!! I had from 10:30-16:00. This happened after day light savings.
I had the same problem with esignal charts. Technical support fixed the problem. I dont know how to fix this one.
lngHistoryHandle(intL) = esignal.RequestHistory(strSymbols(intL), sInterval, bt, nNumBars, -1, -1)
This is how i request data last -1s used to mean all day.
Please help I can not collect anything. I attached my VB program. Please have a look.
And also vb sample program (from esignal) collecting history for a sysmbol fails with the same problem. It is attached to this file as a zip file
################################################## ############################################
Dim WithEvents esignal As IESignal.Hooks
Dim lHistoryHandle As Long
Dim lLastHistoryCount As Long
Dim strTempDir As String
Dim lngHistoryHandle(10001) As Long
Dim strHistoryHandleSymbol(10001) As String
Dim intOnBarReceivedCounter As Integer
Dim sInterval As String
Dim bt As IESignal.barType
Dim nNumBars As Long
Dim strSymbols(10001) As String
Dim intSymbolsCounter As Integer
Dim intNoSymbolsPerShot As Integer
Dim intMaxSymbols As Integer
Dim intOnBarReceivedCounterMini As Integer
Dim intMaxSymbolLoopCounter As Integer
Dim intNoOfSymbols As Integer
Dim intSymbolDelay As Integer
Private Sub ReleaseHistory()
If lHistoryHandle <> 0 Then
esignal.ReleaseHistory lHistoryHandle
lHistoryHandle = 0
lLastHistoryCount = 0
End If
End Sub
Private Sub cmdRequestHistory_Click()
cmdRequestHistory.Caption = "Running"
'bt = btDAYS
bt = btBARS
sInterval = "5" ' Unit is minutes
nNumBars = 80 ' Unit is days
intSleepTimer = 0 ' Unit is miliseconds
strTempDir = "TEMP"
intSymbolsCounter = 0
intHistoryCounter = 0
intNoOfSymbols = intNoSymbols.Text
Open "./symbols_rest.txt" For Input As #1
Do Until (EOF(1) = True)
Input #1, sSymbol
sSymbol = Trim(sSymbol)
intSymbolsCounter = intSymbolsCounter + 1
strSymbols(intSymbolsCounter) = sSymbol
Loop
Close 1
strLine = "You have " & intSymbolsCounter & " symbols"
cmdRequestHistory.Caption = strLine
Sleep (1500)
If intSymbolsCounter < intNoOfSymbols Then
intNoOfSymbols = intSymbolsCounter
End If
For intL = 1 To intNoOfSymbols
lngHistoryHandle(intL) = esignal.RequestHistory(strSymbols(intL), sInterval, bt, nNumBars, -1, -1)
strHistoryHandleSymbol(lngHistoryHandle(intL)) = strSymbols(intL)
cmdRequestHistory.Caption = intL
Sleep (750)
Next intL
strLine = "Symbols 1-" & intNoOfSymbols & " is requested"
cmdRequestHistory.Caption = strLine
End Sub
Private Sub esignal_OnBarsReceived(ByVal lHandle As Long)
intOnBarReceivedCounterMini = intOnBarReceivedCounterMini + 1
intOnBarReceivedCounter = intOnBarReceivedCounter + 1
strLine = intOnBarReceivedCounter & " is received"
cmdRequestHistory.Caption = strLine
sSymbol = strHistoryHandleSymbol(Handle)
FillHistory (lHandle)
esignal.ReleaseHistory (lHandle)
esignal.ClearSymbolCache
End Sub
Private Function FormatBarData(lIndex As Long, item As BarData)
Dim sRet As String
' currently only deals with intervals of 1 and higher. (or p,v,t,s tick charts)
' this is capapble of doing raw ticks, just not formatting the data out.
sRet = Str$(item.dtTime)
sRet = sRet + ", " + Str$(item.dOpen)
sRet = sRet + ", " + Str$(item.dHigh)
sRet = sRet + ", " + Str$(item.dLow)
sRet = sRet + ", " + Str$( item.dClose)
sRet = sRet + ", " + Str$(item.dVolume)
FormatBarData = sRet
End Function
Private Function FillHistory(lHistoryHandle As Long)
' this function handles all bars received and bar updates
sSymbol = strHistoryHandleSymbol(lHistoryHandle)
Dim lNumBars As Long
Dim baritem As IESignal.BarData
Dim lBar As Long
Dim sBar As String
lNumBars = esignal.GetNumBars(lHistoryHandle)
If lNumBars = 0 Then
Exit Function
End If
Open "./date.txt" For Input As #3
Do Until (EOF(3) = True)
Input #3, sDate
sDate = Trim(sDate)
Loop
Close 3
lstHistory.AddItem sDate
strSymbolPath = "../../DATA/INTRADAY/5MIN/" & sDate & "/" & sSymbol
lstHistory.AddItem strSymbolPath
Open strSymbolPath For Output As #2
For lBar = -(lNumBars - 1) To 0
baritem = esignal.GetBar(lHistoryHandle, lBar)
sBar = FormatBarData(lBar, baritem)
Write #2, sBar
Next lBar
Close 2
lstHistory.AddItem sSymbol
FillHistory = 1
End Function
Private Sub Form_Load()
Set esignal = New IESignal.Hooks
lHistoryHandle = 0
lLastHistoryCount = 0
esignal.SetApplication ("utuzel")
End Sub
Private Sub Form_Unload(Cancel As Integer)
esignal.ReleaseAllHistory
esignal.ClearSymbolCache
Set esignal = Nothing
End Sub
Private Sub Text1_Change()
End Sub
Data from 9:30 - 10:30 is missing!!! I had from 10:30-16:00. This happened after day light savings.
I had the same problem with esignal charts. Technical support fixed the problem. I dont know how to fix this one.
lngHistoryHandle(intL) = esignal.RequestHistory(strSymbols(intL), sInterval, bt, nNumBars, -1, -1)
This is how i request data last -1s used to mean all day.
Please help I can not collect anything. I attached my VB program. Please have a look.
And also vb sample program (from esignal) collecting history for a sysmbol fails with the same problem. It is attached to this file as a zip file
################################################## ############################################
Dim WithEvents esignal As IESignal.Hooks
Dim lHistoryHandle As Long
Dim lLastHistoryCount As Long
Dim strTempDir As String
Dim lngHistoryHandle(10001) As Long
Dim strHistoryHandleSymbol(10001) As String
Dim intOnBarReceivedCounter As Integer
Dim sInterval As String
Dim bt As IESignal.barType
Dim nNumBars As Long
Dim strSymbols(10001) As String
Dim intSymbolsCounter As Integer
Dim intNoSymbolsPerShot As Integer
Dim intMaxSymbols As Integer
Dim intOnBarReceivedCounterMini As Integer
Dim intMaxSymbolLoopCounter As Integer
Dim intNoOfSymbols As Integer
Dim intSymbolDelay As Integer
Private Sub ReleaseHistory()
If lHistoryHandle <> 0 Then
esignal.ReleaseHistory lHistoryHandle
lHistoryHandle = 0
lLastHistoryCount = 0
End If
End Sub
Private Sub cmdRequestHistory_Click()
cmdRequestHistory.Caption = "Running"
'bt = btDAYS
bt = btBARS
sInterval = "5" ' Unit is minutes
nNumBars = 80 ' Unit is days
intSleepTimer = 0 ' Unit is miliseconds
strTempDir = "TEMP"
intSymbolsCounter = 0
intHistoryCounter = 0
intNoOfSymbols = intNoSymbols.Text
Open "./symbols_rest.txt" For Input As #1
Do Until (EOF(1) = True)
Input #1, sSymbol
sSymbol = Trim(sSymbol)
intSymbolsCounter = intSymbolsCounter + 1
strSymbols(intSymbolsCounter) = sSymbol
Loop
Close 1
strLine = "You have " & intSymbolsCounter & " symbols"
cmdRequestHistory.Caption = strLine
Sleep (1500)
If intSymbolsCounter < intNoOfSymbols Then
intNoOfSymbols = intSymbolsCounter
End If
For intL = 1 To intNoOfSymbols
lngHistoryHandle(intL) = esignal.RequestHistory(strSymbols(intL), sInterval, bt, nNumBars, -1, -1)
strHistoryHandleSymbol(lngHistoryHandle(intL)) = strSymbols(intL)
cmdRequestHistory.Caption = intL
Sleep (750)
Next intL
strLine = "Symbols 1-" & intNoOfSymbols & " is requested"
cmdRequestHistory.Caption = strLine
End Sub
Private Sub esignal_OnBarsReceived(ByVal lHandle As Long)
intOnBarReceivedCounterMini = intOnBarReceivedCounterMini + 1
intOnBarReceivedCounter = intOnBarReceivedCounter + 1
strLine = intOnBarReceivedCounter & " is received"
cmdRequestHistory.Caption = strLine
sSymbol = strHistoryHandleSymbol(Handle)
FillHistory (lHandle)
esignal.ReleaseHistory (lHandle)
esignal.ClearSymbolCache
End Sub
Private Function FormatBarData(lIndex As Long, item As BarData)
Dim sRet As String
' currently only deals with intervals of 1 and higher. (or p,v,t,s tick charts)
' this is capapble of doing raw ticks, just not formatting the data out.
sRet = Str$(item.dtTime)
sRet = sRet + ", " + Str$(item.dOpen)
sRet = sRet + ", " + Str$(item.dHigh)
sRet = sRet + ", " + Str$(item.dLow)
sRet = sRet + ", " + Str$( item.dClose)
sRet = sRet + ", " + Str$(item.dVolume)
FormatBarData = sRet
End Function
Private Function FillHistory(lHistoryHandle As Long)
' this function handles all bars received and bar updates
sSymbol = strHistoryHandleSymbol(lHistoryHandle)
Dim lNumBars As Long
Dim baritem As IESignal.BarData
Dim lBar As Long
Dim sBar As String
lNumBars = esignal.GetNumBars(lHistoryHandle)
If lNumBars = 0 Then
Exit Function
End If
Open "./date.txt" For Input As #3
Do Until (EOF(3) = True)
Input #3, sDate
sDate = Trim(sDate)
Loop
Close 3
lstHistory.AddItem sDate
strSymbolPath = "../../DATA/INTRADAY/5MIN/" & sDate & "/" & sSymbol
lstHistory.AddItem strSymbolPath
Open strSymbolPath For Output As #2
For lBar = -(lNumBars - 1) To 0
baritem = esignal.GetBar(lHistoryHandle, lBar)
sBar = FormatBarData(lBar, baritem)
Write #2, sBar
Next lBar
Close 2
lstHistory.AddItem sSymbol
FillHistory = 1
End Function
Private Sub Form_Load()
Set esignal = New IESignal.Hooks
lHistoryHandle = 0
lLastHistoryCount = 0
esignal.SetApplication ("utuzel")
End Sub
Private Sub Form_Unload(Cancel As Integer)
esignal.ReleaseAllHistory
esignal.ClearSymbolCache
Set esignal = Nothing
End Sub
Private Sub Text1_Change()
End Sub
Comment