Exemplo n.º 1
0
 private void OrderSellBtn_Click(object sender, EventArgs e)
 {
     try
     {
         var instr = GetSelectedInstrument();
         var price = InputForm.GetPrice("Sell order Price", instr.BuyOffers.BestPrice);
         if (price == null)
         {
             return;
         }
         var quantity = InputForm.GetInt("Sell order Quantity", 1);
         if (quantity == null)
         {
             return;
         }
         if (price != null)
         {
             instr.Sell(price, (uint)quantity);
         }
     }
     catch (Exception ex)
     {
         ex.PrintError();
     }
 }
Exemplo n.º 2
0
 private void OrderModifyBtn_Click(object sender, EventArgs e)
 {
     try
     {
         var order = GetSelectedOrder();
         var price = InputForm.GetPrice("New Price", order.Price);
         if (price != null)
         {
             order.Modify(price);
         }
     }
     catch (Exception ex)
     {
         ex.PrintError();
     }
 }