コード例 #1
0
ファイル: FrmMain.cs プロジェクト: w1r2p1/LittleQuant
        private void button5_Click(object sender, EventArgs e)
        {
            var     type     = this.comboBox1.SelectedItem as Type;
            dynamic exchange = ExchangeManager.GetExchange(type);

            this.ShowLog(exchange.Account.ToString());
        }
コード例 #2
0
        public void Start()
        {
            this.Running = true;
            var exchange   = ExchangeManager.GetExchange <IOptionExchange>();
            var instrument = exchange.Instruments.First();
            var market     = exchange.Market(instrument);
            var order      = new OptionOrder
            {
                InstrumentID = instrument.ID,
                Qty          = 100,
                Price        = market.Asks.First().Price,
                Side         = OrderSide.Buy,
                OpenClose    = OpenClose.Open
            };

            exchange.SubmitOrder(order);
            this.Log?.Invoke(LogType.Trade, order.ToString());
        }