示例#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();
     }
 }