I want to work with a DLL file to export historical data from an other trading plateform. But I have the error message: "Unhandled exception: unable to read beyond the end of stream" (see the added image).
This is a part of code:
{
if (State == State.SetDefaults)
{
.......
}
else if (State == State.Configure)
{
string connectionString = "Server=PCAM1;Database=NinjaTrader_ExportHistorica lData;User Id=sa;Password = n2Ls5kiKojV3839S37rT; ";
export = new ExportHD(connectionString);
Log("_____________---------------State = State.Configure---------------_____________", LogLevel.Information);
}
}
tected override void OnBarUpdate()
{
export.connect("127.0.0.1", 7496, 0);
try
{
export.exportHistoricalData(1, symbolDetails, EndDateTime, Duration, BarSizeSetting, WhatToShow, UserRTH, 1);
}
catch (Exception e)
{
Log("_____________---------------Exception message = " + e.Message + "---------------_____________", LogLevel.Information);
}
finally
{
export.disconnect();
}
}
Comment