示例#1
0
 //only for one button order
 //note: the only difference id not to collect basic info
 public void DirectMakeOrder(OrderDirection direction, ExecuteType iexecuteType)
 {
     OrderDirection = direction;
     ExecutionType  = iexecuteType;
     PBMsgTrader.PBMsgOrderInsert pb = CreateOrder(mFutureFlag);
     View.SendOrder(pb);
 }
示例#2
0
 //only for fast order
 private void MakeOrder(OrderDirection direction, ExecuteType iexecuteType)
 {
     //View.CollectCurrentSettings();
     //{
     OrderDirection = direction;
     ExecutionType  = iexecuteType;
     PBMsgTrader.PBMsgOrderInsert pb = CreateOrder(mFutureFlag);
     View.SendOrder(pb);
     //}
     //else
     //{
     //    MessageBox.Show("请检查是否选中报价或量等", "错误");
     //}
 }
示例#3
0
        private void ClosePosition(bool longOrShort)
        {
            int position = 0;//; TradeHandler.Instance.GetPosition(SymbolID, longOrShort);

            if (position > 0)
            {
                Size = position;
                if (longOrShort)
                {
                    OrderDirection = PBWrapMsgOG.OrderDirection.Sell;
                }
                else
                {
                    OrderDirection = PBWrapMsgOG.OrderDirection.Buy;
                }

                PBMsgTrader.PBMsgOrderInsert pb = CreateOrder(FutureFlag.Close);
                View.SendOrder(pb);
            }
        }
示例#4
0
 public void SendOrder(PBMsgTrader.PBMsgOrderInsert pb)
 {
 }