private static void ExtendedTest(IClient client) { Extended extended = new Extended(client); UsedType usedType = new UsedType(); usedType.Code = 1; usedType.Description = "test"; InType inType = new InType(); inType.Used = usedType; inType.Value = 2; InOutType inOutType = new InOutType(); inOutType.Used = usedType; inOutType.Value2 = 3; OutType outType = null; ReturnType returnType = extended.Do(inType, ref inOutType, out outType); SortedDictionary<string, double> reports = new SortedDictionary<string, double>(); reports["EUR/USD"] = 1000; Dictionary<string, double> reports2 = new Dictionary<string, double>(); reports["EUR/JPY"] = 333; extended.Update(ref reports, ref reports2); return; }
private static void SpeedTest(IClient client) { Extended extended = new Extended(client); DateTime start = DateTime.UtcNow; Int32 count = 320 * 1024; for (Int32 index = 0; index < count; ++index) { Double amount = 0; Double volume = 100000; extended.MarketBuy("EUR/USD", 1.3, ref volume, out amount); } DateTime finish = DateTime.UtcNow; Double interval = (finish - start).TotalSeconds; Double speed = (count / interval); Console.WriteLine("LRP speed"); Console.WriteLine("Interval = {0}", interval); Console.WriteLine("Speed = {0}", speed); }