Esempio n. 1
0
        public void AssertBotPos(int ind, int stockExchId, int botId,
                                 string instrument, int amount)
        {
            VMBotPosTrdMgr bp = _dataSynchBotPosTrdMgr.CollVM[ind];

            Assert.AreEqual(bp.StockExchId, stockExchId);
            Assert.AreEqual(bp.BotId, botId);
            Assert.AreEqual(bp.Instrument, instrument);
            Assert.AreEqual(bp.Amount, amount);
        }
Esempio n. 2
0
        private void RowMenuTraderPos_Click_ClosePos(object sender, RoutedEventArgs e)
        {
            int ind = DataGridBotPos.SelectedIndex;

            if (ind < 0)
            {
                return;
            }

            VMBotPosTrdMgr vmBotPos = (VMBotPosTrdMgr)DataGridBotPos.Items[ind];

            CCloseBotPosTrdMgr bpTrdMgr = new CCloseBotPosTrdMgr
            {
                StockExchId = vmBotPos.StockExchId,
                BotId       = vmBotPos.BotId,
                Instrument  = vmBotPos.Instrument
            };



            CCommands.CmdCloseTraderPos.Execute(bpTrdMgr, this);
        }