Beispiel #1
0
        // 更新策略状态
        public void Update(object state)
        {
            StrategyExHelper.PrintRunningDate(this);

            updateTradeSlice();
            updateTradeDay();

            StrategyExHelper.PrintRuntimeStatus(this);
        }
Beispiel #2
0
        public override void onCustomInit()
        {
            if (AllFutures.Count != 2)
            {
                SwitchRunningState(ERunningState.InitFailed);
            }

            _futureA     = AllFutures[0];
            _futureB     = AllFutures[1];
            _instrumentA = _futureA.ID;
            _instrumentB = _futureB.ID;

            StrategyExHelper.PrintRunningDate(this);

            setupDeadline();
            setupHedgeStatusTracer();

            SwitchRunningState(ERunningState.DurationWatch);
        }