コード例 #1
0
        public void updateSaleType(string type)
        {
            int index = 0;
            List <ObjectOtherOrders> buyOrderData = fetchOrderData(type, index);

            while (buyOrderData != null && buyOrderData.Count > 0)
            {
                //on va aller voir à laquelle de nos commandes ça correspond
                OrderElement myOrderForThisItem = orders.Where(o => (buyOrderData.Where(bod => bod.orderId == o.orderId && bod.bid == (type == "buy")).Count()) > 0).First();
                double       newPrice           = myOrderForThisItem.getUpdatedPrice(buyOrderData);

                if (newPrice > 0)
                {
                    //MessageBox.Show("Présent Montant: "+ myOrderForThisItem.orderAmmount.ToString() + " Montant: " + newPrice.ToString());
                    modifyOrderSpecificElement(type, index, newPrice, myOrderForThisItem.orderAmmount);
                }
                index++;
                Automation.I.waitAWhile();
                buyOrderData = fetchOrderData(type, index);
            }
            //on
            return;
        }