示例#1
0
        public void UpdateUI(DeepBookMessage entry)
        {
            DataGridView grid = (DataGridView)uiControl;

            if (grid.Rows.Count == 0)
            {
                grid.Rows.Add(numRows);
            }

            if (entry.Side == 1)
            {
                grid[BID_MAKER_IDX, entry.Position].Value = entry.MarketMaker;
                grid[BID_SIZE_IDX, entry.Position].Value  = entry.Size;
                grid[BID_PRICE_IDX, entry.Position].Value = entry.Price;
            }
            else
            {
                grid[ASK_MAKER_IDX, entry.Position].Value = entry.MarketMaker;
                grid[ASK_SIZE_IDX, entry.Position].Value  = entry.Size;
                grid[ASK_PRICE_IDX, entry.Position].Value = entry.Price;
            }
        }
示例#2
0
        public override void UpdateUI(IBMessage message)
        {
            DataGridView grid = (DataGridView)uiControl;

            if (grid.Rows.Count == 0)
            {
                grid.Rows.Add(numRows * 2);
            }

            DeepBookMessage entry = (DeepBookMessage)message;

            if (entry.Side == 1)
            {
                grid[BID_MAKER_IDX, GetBidIndex(entry.Position)].Value = entry.MarketMaker;
                grid[BID_SIZE_IDX, GetBidIndex(entry.Position)].Value  = entry.Size;
                grid[BID_PRICE_IDX, GetBidIndex(entry.Position)].Value = entry.Price;
            }
            else
            {
                grid[ASK_MAKER_IDX, GetAskIndex(entry.Position)].Value = entry.MarketMaker;
                grid[ASK_SIZE_IDX, GetAskIndex(entry.Position)].Value  = entry.Size;
                grid[ASK_PRICE_IDX, GetAskIndex(entry.Position)].Value = entry.Price;
            }
        }
示例#3
0
文件: Program.cs 项目: svengl/IBNet
 static void client_UpdateMktDepth(DeepBookMessage e)
 {
     // Console.WriteLine("Tick ID: " + e. + " Tick Side: " + EnumDescConverter.ToIBTxt(e.Side) +
     //                   " Tick Size: " + e.Size + " Tick Price: " + e.Price + " Tick Position: " + e.Position +
     //                   " Operation: " + EnumDescConverter.ToIBTxt(e.Operation));
 }