コード例 #1
0
 private void Executor_OnDayFinished(object sender, StrategyDayFinishedArguments arguments)
 {
     if (OnStrategyDayFinished != null)
     {
         OnStrategyDayFinished(sender, arguments);
     }
 }
コード例 #2
0
        private void Executor_OnDayFinished(object sender, StrategyDayFinishedArguments arguments)
        {
            IKLineData klineData = arguments.ExecutorInfo.CurrentKLineData;

            //Console.WriteLine(klineData.Code + "," + klineData + " Finished");
            Console.WriteLine(arguments.ExecutorInfo.CurrentDayIndex + "|" + arguments.ExecutorInfo.TotalDayCount);
        }
コード例 #3
0
        private void RealTimeReader_OnBar(object sender, IForwardOnBarArgument argument)
        {
            OnBar_ReferedStrategies(this.Strategy, argument);
            IKLineData_Extend mainKLineData = argument.MainBar.KLineData;

            if (this.strategyExecutorInfo != null)
            {
                this.strategyExecutorInfo.CurrentKLineData = mainKLineData;
            }
            if (HasBarFinishedEvent())
            {
                if (tempBarFinishedArguments == null)
                {
                    tempBarFinishedArguments = new StrategyBarFinishedArguments(this.strategyExecutorInfo);
                }
                DealBarFinishEvent(tempBarFinishedArguments);
            }
            if (HasDayFinishedEvent() && mainKLineData.IsDayEnd())
            {
                if (tempDayFinishedArguments == null)
                {
                    tempDayFinishedArguments = new StrategyDayFinishedArguments(this.strategyExecutorInfo);
                }
                DealDayFinishEvent(tempDayFinishedArguments);
            }

            this.strategyExecutorInfo.CurrentKLineData = mainKLineData;
            this.strategyExecutorInfo.CurrentDay       = mainKLineData.GetTradingTime().TradingDay;

            if (mainKLineData.IsDayStart())
            {
                this.strategyExecutorInfo.CurrentDayIndex++;
                //this.strategyExecutorInfo.CurrentDay = mainKLineData.GetTradingTime().TradingDay;
            }
        }
コード例 #4
0
 protected void DealDayFinishEvent(StrategyDayFinishedArguments dayFinishedArguments)
 {
     if (OnDayFinished != null)
     {
         OnDayFinished(this, dayFinishedArguments);
     }
 }
コード例 #5
0
        private void InitStrategyExecutorInfo()
        {
            this.strategyExecutorInfo                 = new StrategyExecutorInfo(codePeriod, dataPackage.GetTradingDays().Count);
            this.strategyExecutorInfo.CurrentDay      = dataPackage.GetTradingDays()[0];
            this.strategyExecutorInfo.CurrentDayIndex = 0;

            this.tempBarFinishedArguments = new StrategyBarFinishedArguments(this.strategyExecutorInfo);
            this.tempDayFinishedArguments = new StrategyDayFinishedArguments(this.strategyExecutorInfo);
        }
コード例 #6
0
 private void Pool_OnDayFinished(object sender, StrategyDayFinishedArguments arguments)
 {
     poolDetector.DayEndExecutor(arguments.ExecutorInfo);
 }
コード例 #7
0
        private void Executor_OnStrategyDayFinished(object sender, StrategyDayFinishedArguments arguments)
        {
            IStrategyExecutorInfo executorInfo = arguments.ExecutorInfo;

            Console.WriteLine(executorInfo.CurrentKLineData.Code + "," + executorInfo.CurrentKLineData);
        }
コード例 #8
0
 private void Executor_OnDayFinished(object sender, StrategyDayFinishedArguments arguments)
 {
     //this.strategyExecutorInfo.CurrentDay =
     DealDayFinishEvent(arguments);
 }
コード例 #9
0
 private void Executor_OnDayFinished(object sender, StrategyDayFinishedArguments arguments)
 {
     Console.WriteLine(arguments.ExecutorInfo.CurrentDay + " Finished");
 }