Hi,
I use ESignal 10.1a and try to access realTimeQuotes from my C# program.
I use Interop.IESignal.dll (60kb) to do that.
esignal = new IESignal.HooksClass();
esignal.OnQuoteChanged += new IESignal._IHooksEvents_OnQuoteChangedEventHandler( esignal_OnQuoteChanged);
I call requestSymbol once for each of two symbols.
However after receiving two streams of data for about 5 seconds application hangs and doesn't respond.
public static void requestSymbol(String symbol)
{
try
{ getESignal().RequestSymbol(symbol, 0);
}
catch (Exception e)
{
log.Error("RequestSymbol error", e);
esignal = null; getESignal().RequestSymbol(symbol, 0);
}
}
public static void esignal_OnQuoteChanged(String symbol)
{
long currentTime = DateTime.Now.Ticks;
if (!symbolTimes.ContainsKey(symbol) || currentTime - symbolTimes[symbol] > feedInterval)
{
if (!symbolTimes.ContainsKey(symbol)) symbolTimes.Add(symbol, currentTime);
else symbolTimes[symbol] = currentTime;
}
else
{
log.Debug(symbol + " is out of feedInterval; time = " + currentTime);
}
log.Debug("Sending symbol = " + symbol);
IESignal.BasicQuote bq = getESignal().get_GetBasicQuote(symbol);
}
feedInterval = 0.5 sec or 1 second
Btw where can I get the latest version of Interop.IESignal.dll. It seems that my version is far out of date.
I use ESignal 10.1a and try to access realTimeQuotes from my C# program.
I use Interop.IESignal.dll (60kb) to do that.
esignal = new IESignal.HooksClass();
esignal.OnQuoteChanged += new IESignal._IHooksEvents_OnQuoteChangedEventHandler( esignal_OnQuoteChanged);
I call requestSymbol once for each of two symbols.
However after receiving two streams of data for about 5 seconds application hangs and doesn't respond.
public static void requestSymbol(String symbol)
{
try
{ getESignal().RequestSymbol(symbol, 0);
}
catch (Exception e)
{
log.Error("RequestSymbol error", e);
esignal = null; getESignal().RequestSymbol(symbol, 0);
}
}
public static void esignal_OnQuoteChanged(String symbol)
{
long currentTime = DateTime.Now.Ticks;
if (!symbolTimes.ContainsKey(symbol) || currentTime - symbolTimes[symbol] > feedInterval)
{
if (!symbolTimes.ContainsKey(symbol)) symbolTimes.Add(symbol, currentTime);
else symbolTimes[symbol] = currentTime;
}
else
{
log.Debug(symbol + " is out of feedInterval; time = " + currentTime);
}
log.Debug("Sending symbol = " + symbol);
IESignal.BasicQuote bq = getESignal().get_GetBasicQuote(symbol);
}
feedInterval = 0.5 sec or 1 second
Btw where can I get the latest version of Interop.IESignal.dll. It seems that my version is far out of date.
Comment