//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); }
//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("请检查是否选中报价或量等", "错误"); //} }
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); } }
public void SendOrder(PBMsgTrader.PBMsgOrderInsert pb) { }