TWS returns bad AgentDescription "0" (started 2016-01-07) and throws InvalidCastException · Issue #15 · krs43/ib-csharp · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Thursday 2016-01-07 my Application (usking krs.ats.ib-csharp) suddemly crashed with an InvalidCastException. I trcked this down to happen in IBClient.cs. TWS sends a bad code "0" for AgentDescription.
A possible fix looks like this:
IBClient.cs, line 3770:
if (version >= 9)
{
rstr = ReadStr();
AgentDescription ad = AgentDescription.None;
if (!string.IsNullOrEmpty(rstr))
{
try
{
ad = (AgentDescription)EnumDescConverter.GetEnumValue(typeof(AgentDescription), rstr);
}
catch (Exception)
{
ad = AgentDescription.None;
}
}
order.Rule80A = ad;
order.PercentOffset = ReadDouble();
The text was updated successfully, but these errors were encountered:
DrKoch
changed the title
TWS returns bad AgentDescription "0" (started 2016-01-07)
TWS returns bad AgentDescription "0" (started 2016-01-07) and throws InvalidCastException
Jan 10, 2016
On Thursday 2016-01-07 my Application (usking krs.ats.ib-csharp) suddemly crashed with an InvalidCastException. I trcked this down to happen in IBClient.cs. TWS sends a bad code "0" for AgentDescription.
A possible fix looks like this:
IBClient.cs, line 3770:
The text was updated successfully, but these errors were encountered: