Esempio n. 1
0
        public override void OnStrategyStart()
        {
            TimeHelper = new TimeHelper(Instrument.Symbol);
            PriceHelper = new PriceHelper(Instrument.TickSize);
            TextParameter = new TextCommon() { OpenClose = EnumOpenClose.OPEN };
            CloseTodayHelper = new CloseTodayHelper(EnumExchangeID.SHFE);

            DualPosition = new DualPosition(Instrument.Symbol);
            DualPosition.Sell.PriceHelper = PriceHelper;
            DualPosition.Buy.PriceHelper = PriceHelper;
            DualPosition.CloseTodayHelper = CloseTodayHelper;

            TargetPosition = 0;
            DualPosition.Long.Qty = 0;
            DualPosition.Long.QtyToday = 0;
            DualPosition.Short.Qty = 0;
            DualPosition.Short.QtyToday = 0;
        }