Ejemplo n.º 1
0
 public ForceExitOrder(SSBase strategy, ActionType actionType, BaseOrderType lmtOrderType = null, BaseOrderType mktOrderTYpe = null)
 {
     Strategy   = strategy.GetType() == typeof(Strategy) ? (Strategy)strategy : null;
     OT_pre     = lmtOrderType != null ? lmtOrderType : OT_pre;
     OT_final   = mktOrderTYpe != null ? mktOrderTYpe : OT_final;
     ActionType = actionType;
 }
Ejemplo n.º 2
0
        public AdaptiveProfitStop(SSBase strategy, ActionType actionType, BaseOrderType stpLmtOrder = null)
        {
            Strategy      = strategy.GetType() == typeof(Strategy) ? (Strategy)strategy : null;
            OT_stopProfit = stpLmtOrder == null ? new IBStopLimitOrder() : stpLmtOrder;
            OT_stopLoss   = stpLmtOrder == null ? new IBStopLimitOrder() : stpLmtOrder.CloneObject();

            /*
             * OT_stopProfit.Slippages = new ObservableCollection<CSlippage>();
             * OT_stopProfit.Slippages.Add(new CSlippage { Slippage = 1, PosSize = 1 });
             * OT_stopLoss.Slippages = new ObservableCollection<CSlippage>();
             * OT_stopLoss.Slippages.Add(new CSlippage { Slippage = 1, PosSize = 1 });*/
            ActionType = actionType;
        }