Imports System.IO Imports System.Collections.Specialized Imports IESignal Module esignaldailydatarun Dim WithEvents esignal As New IESignal.Hooks Dim pathfull As String Sub Main() Dim requesthistoryhandle As Long Dim daysbars As Long Dim numbars As Long Dim path As String Dim sym As String Dim continuous As String Dim symfull As String Dim ext As String esignal.SetApplication("biovizier") esignal.ClearSymbolCache() numbars = 100000 daysbars = barType.btDAYS path = "C:\Documents and Settings\Nicholas Francis\My Documents\System\PVWave\Esignal_data\" continuous = " #F=1" ext = ".txt" sym = "CL" symfull = sym + continuous pathfull = path + sym + ext requesthistoryhandle = esignal.RequestHistory(symfull, "D", daysbars, numbars, -1, -1) End Sub Public Sub esignal_onbarsreceived(ByVal lhandle As Integer) Handles esignal.OnBarsReceived processhistory(lhandle) esignal.ClearSymbolCache() esignal.ReleaseAllHistory() esignal = System.DBNull.Value End End Sub Public Sub processhistory(ByVal historyhandle As Long) Dim lnumbars As Long Dim baritem As IESignal.BarData Dim j As Long Dim mystreamwriter As StreamWriter = New StreamWriter(pathfull) lnumbars = esignal.GetNumBars(historyhandle) If lnumbars = 0 Then Exit Sub End If For j = -(lnumbars - 1) To 0 baritem = esignal.GetBar(historyhandle, j) mystreamwriter.Write(baritem) Next j mystreamwriter.Close() End Sub End Module