Ejemplo n.º 1
0
        /// <summary>
        /// Send Order for current TickDetail
        /// </summary>
        /// <param name="param">current TickDetail</param>
        private void SendOrderExecute(object param)
        {
            SelectedTickDetail = (MarketDataDetail)param;

            _sendOrderViewModel.SetOrderExecutionProvider(Provider.ProviderName);
            _sendOrderViewModel.SetSecurityInformation(SelectedTickDetail.Security, SelectedTickDetail.BidPrice, SelectedTickDetail.AskPrice);

            SendOrderWindow orderWindow = new SendOrderWindow();

            orderWindow.DataContext = _sendOrderViewModel;
            orderWindow.Owner       = _scannerWindow;

            orderWindow.ShowDialog();
        }
Ejemplo n.º 2
0
        private void RunTradeAction(string para)
        {
            OrderModel orderModel = new OrderModel()
            {
                StCode       = this.AccountModel.StCode,
                StName       = this.AccountModel.StName,
                CurrentPrice = this.StockCurrentPrice.CurrentPrice
            };

            switch (para)
            {
            case "Purcase":
            {
                orderModel.HogaCode  = HogaCode.지정가;
                orderModel.OrderType = OrderType.신규매수;
            }
            break;

            case "Selling":
            {
                orderModel.HogaCode   = HogaCode.지정가;
                orderModel.OrderType  = OrderType.신규매도;
                orderModel.OrderCount = this.AccountModel.HaveStockCount;
            }
            break;

            default:
                break;
            }

            SendOrderWindow window = new SendOrderWindow(orderModel);

            if (window.ShowDialog() == true)
            {
                //주문전송
                this.kHControlViewModel.SendOrder(orderModel.StCode, orderModel.OrderType, orderModel.OrderCount, orderModel.OrderPrice, orderModel.HogaCode, "0");
            }
        }