コード例 #1
0
        private void clickStatusButton(object sender, EventArgs e)
        {
            BackEnd.clock.Stop();
            if (Riders.AtID(selectionID).layorders == null)
            {
                return;
            }

            List <CancelInstruction> cancelInstructions = new List <CancelInstruction>();
            CancelInstruction        cancelInstruction;

            for (int i = 0; i < Riders.AtID(selectionID).layorders.Count; i++)
            {
                cancelInstruction       = new CancelInstruction();
                cancelInstruction.BetId = Riders.AtID(selectionID).layorders[i].BetId;
                cancelInstructions.Add(cancelInstruction);
            }

            for (int i = 0; i < Riders.AtID(selectionID).backorders.Count; i++)
            {
                cancelInstruction       = new CancelInstruction();
                cancelInstruction.BetId = Riders.AtID(selectionID).backorders[i].BetId;
                cancelInstructions.Add(cancelInstruction);
            }

            ApiSet.CancelOrders(cancelInstructions);
            BackEnd.clock.Start();
        }
コード例 #2
0
        private void clickEnter(object sender, EventArgs e)
        {
            Riders.AtID(ID).hasAutoOrder = true;
            Riders.AtID(ID).maxPrice     = Utils.String2Double(MaxPriceBox.Text);
            Riders.AtID(ID).minPrice     = Utils.String2Double(MinpriceBox.Text);

            string price = StartpriceBox.Text;
            string size  = SizeBox.Text;

            PlaceInstruction instruction = new PlaceInstruction();

            instruction.OrderType = OrderType.LIMIT;

            LimitOrder order = new LimitOrder();

            instruction.Side        = Side.LAY;
            instruction.SelectionId = ID;

            order.PersistenceType = PersistenceType.PERSIST;

            order.Price = Utils.String2Double(price);
            order.Size  = Convert.ToDouble(size);

            instruction.LimitOrder = order;

            ApiSet.PlaceOrder(instruction);

            BackEnd.clock.Start();
            this.Dispose();
        }
コード例 #3
0
 private void addRiderlabels()
 {
     addRiderlabel("cumulative", Riders.AtID(ID).overround.ToString(), 0);
     addRiderlabel("has_autoorder", Riders.AtID(ID).hasAutoOrder.ToString(), 15);
     addRiderlabel("isinthemoney", Riders.AtID(ID).isInthemoney.ToString(), 30);
     addRiderlabel("isOpen", Riders.AtID(ID).isOpen.ToString(), 45);
     addRiderlabel("latestMarketPrice", Riders.AtID(ID).latestMarketprice.ToString(), 60);
     addRiderlabel("marketAsk", Riders.AtID(ID).marketAsk.ToString(), 90);
     addRiderlabel("marketBid", Riders.AtID(ID).marketBid.ToString(), 105);
     addRiderlabel("maxPrice", Riders.AtID(ID).maxPrice.ToString(), 120);
     addRiderlabel("minPrice", Riders.AtID(ID).minPrice.ToString(), 135);
     addRiderlabel("myAsk", Riders.AtID(ID).myAsk.ToString(), 150);
     addRiderlabel("myBid", Riders.AtID(ID).myBid.ToString(), 165);
     addRiderlabel("name", Riders.AtID(ID).name.ToString(), 180);
     addRiderlabel("pnl", Riders.AtID(ID).pnl.ToString(), 195);
     addRiderlabel("totalMarketAmount", Riders.AtID(ID).totalmarketamount.ToString(), 240);
     addRiderlabel("turnover", Riders.AtID(ID).turnover.ToString(), 270);
 }