Ejemplo n.º 1
0
        public void RequestCreateOrder(Object lOrderParam)
        {
            orderParam	= (CreateOrderClass)lOrderParam;

            WebMetodAnser webMetodAnser	= GetWebMetodData(eWebMetods.CreateOrder);
            try {
                parentCP.Invoke(new Action<WebMetodAnser>((s) => parentCP.UpdateCreatelOrder(s)), webMetodAnser);
            }
            catch { }

            Application.ExitThread();
        }
Ejemplo n.º 2
0
        private void SendParcelOrder()
        {
            if (advancedByOrders.Count == 0) {
                timerParcelBuy.Enabled	= false;
                return;
            }

            OrderForParcelClass parcelOrder	= advancedByOrders[0];

            CreateOrderClass orderParam	= new CreateOrderClass();
            orderParam.MarketID		= parcelOrder.MarketID;
            orderParam.OrderType	= eOrderType.Buy;
            orderParam.Price		= parcelOrder.Price.Replace(",", ".");
            orderParam.Quantity		= parcelOrder.Quantity.Replace(",", ".");

            CreateSpamTrade	= true;
            RequestCreateOrder(orderParam);

            advancedByOrders.Remove(parcelOrder);
        }
Ejemplo n.º 3
0
        private void RequestCreateOrder(CreateOrderClass orderParam)
        {
            if (orderParam.MarketID == null || orderParam.Price == null || orderParam.Quantity == null){
                    return;
            }

            Thread requestThread	= new Thread(new ParameterizedThreadStart(webServiceClass.RequestCreateOrder));
            requestThread.Name		= "Create new order";
            requestThread.Start(orderParam);
        }
Ejemplo n.º 4
0
        private void Sell_Click(object sender, EventArgs e)
        {
            CreateOrderClass orderParam	= new CreateOrderClass();
            orderParam.MarketID		= marketID;
            orderParam.OrderType	= eOrderType.Sell;
            orderParam.Price		= numericSellPrice.Value.ToString().Replace(",", ".");
            orderParam.Quantity		= numericSellAmount.Value.ToString().Replace(",", ".");

            RequestCreateOrder(orderParam);
        }
Ejemplo n.º 5
0
        private void buttonBuy_Click(object sender, EventArgs e)
        {
            CreateOrderClass orderParam	= new CreateOrderClass();
            orderParam.MarketID		= marketID;
            orderParam.OrderType	= eOrderType.Buy;
            orderParam.Price		= numericBuyPrice.Value.ToString().Replace(",", ".");
            orderParam.Quantity		= numericBuyAmount.Value.ToString().Replace(",", ".");

            CreateSpamTrade	= false;
            RequestCreateOrder(orderParam);
        }