﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>RightEdge Forums / Trading / Trading Systems  / Decimal separator bug / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>RightEdge Forums</description><link>http://www.rightedgesystems.com/forums/</link><webMaster>rightedge@yyesoftware.com</webMaster><lastBuildDate>Wed, 08 Feb 2012 15:45:49 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Decimal separator bug</title><link>http://www.rightedgesystems.com/forums/Topic10573-9-1.aspx</link><description>Thank you, Daniel!&lt;br&gt;&lt;br&gt;Temporarily I changed decimal separator in Windows globally, it works, I can wait for Beta 15 version with this.</description><pubDate>Tue, 26 Jan 2010 05:20:55 GMT</pubDate><dc:creator>Largo</dc:creator></item><item><title>RE: Decimal separator bug</title><link>http://www.rightedgesystems.com/forums/Topic10573-9-1.aspx</link><description>This will be fixed in the next build, which should be out soon.  Until then, you can download the source code for the TWS plugin and fix it yourself.  See [url=http://www.rightedgesystems.com/forums/Topic9847-16-1.aspx]here[/url] for details on how to get the source.  You will want to update the client_UpdateAccountValue method in TWSPlugin.cs to use the invariant culture when parsing the account value, like this:&lt;br&gt;&lt;br&gt;buyingPower = Convert.ToDouble(e.Value, CultureInfo.InvariantCulture);&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;Daniel</description><pubDate>Tue, 26 Jan 2010 02:16:08 GMT</pubDate><dc:creator>dplaisted</dc:creator></item><item><title>Decimal separator bug</title><link>http://www.rightedgesystems.com/forums/Topic10573-9-1.aspx</link><description>In my country decimal separator for numbers is comma, not dot.&lt;br&gt;I have installed MS Visual Studio 2008 Pro.&lt;br&gt;&lt;br&gt;When I try to run live any trading system (even without any my code) RE throws exception and crashes.&lt;br&gt;It stops on step 4 of 6.&lt;br&gt;&lt;br&gt;Normally I could change locale within C# code, but it not works in RE:&lt;br&gt;Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US",false);&lt;br&gt;&lt;br&gt;What to do?&lt;br&gt;&lt;br&gt;&lt;br&gt;[code]&lt;br&gt;An exception of type System.InvalidOperationException was thrown.&lt;br&gt;Exception thrown while processing message: AccountValue&lt;br&gt;   w Krs.Ats.IBNet.IBClient.ProcessMsg(IncomingMessage msgId)&lt;br&gt;   w Krs.Ats.IBNet.IBClient.Run()&lt;br&gt;   w System.Threading.ThreadHelper.ThreadStart_Context(Object state)&lt;br&gt;   w System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)&lt;br&gt;   w System.Threading.ThreadHelper.ThreadStart()&lt;br&gt;&lt;br&gt;Inner Exception:&lt;br&gt;An exception of type System.FormatException was thrown.&lt;br&gt;Nieprawidłowy format ciągu wejściowego.&lt;br&gt;   w System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer&amp; number, NumberFormatInfo info, Boolean parseDecimal)&lt;br&gt;   w System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)&lt;br&gt;   w System.Double.Parse(String s, NumberStyles style, NumberFormatInfo info)&lt;br&gt;   w System.Convert.ToDouble(String value)&lt;br&gt;   w RightEdge.TWSCSharpPlugin.TWSPlugin.client_UpdateAccountValue(Object sender, UpdateAccountValueEventArgs e)&lt;br&gt;   w Krs.Ats.IBNet.IBClient.RaiseEvent[T](EventHandler`1 event, Object sender, T e)&lt;br&gt;   w Krs.Ats.IBNet.IBClient.OnUpdateAccountValue(UpdateAccountValueEventArgs e)&lt;br&gt;   w Krs.Ats.IBNet.IBClient.updateAccountValue(String key, String value, String currency, String accountName)&lt;br&gt;   w Krs.Ats.IBNet.IBClient.ProcessMsg(IncomingMessage msgId)&lt;br&gt;[/code]</description><pubDate>Mon, 25 Jan 2010 14:03:41 GMT</pubDate><dc:creator>Largo</dc:creator></item></channel></rss>
