public void GetOrders() { var orders = o2g.GetOrders(""); string orderID = "", tradeID = ""; var toc = o2g.Desk.GetTimeout(o2g.Desk.TIMEOUT_COMMON); var pair = "USD/JPY"; var price = o2g.GetOffers().First(o => o.Pair == pair).Ask; o2g.FixOrderOpen("USD/JPY", true, 1000, price + o2g.InPoints(pair, 15), price - o2g.InPoints(pair, 15), "Dimok"); var t = new Thread(() => Thread.Sleep(5000)); t.Start(); t.Join(); if (tradeID != "") { o2g.FixOrdersClose(tradeID); } t = new Thread(() => Thread.Sleep(5000)); ListCollectionView List = new ListCollectionView(orders); }
public string[] CloseTrades(string[] tradeIds) { return(fw.FixOrdersClose(tradeIds).Select(o => o + "").ToArray()); }