private void Executor_OnDayFinished(object sender, StrategyDayFinishedArguments arguments) { if (OnStrategyDayFinished != null) { OnStrategyDayFinished(sender, arguments); } }
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); }
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; } }
protected void DealDayFinishEvent(StrategyDayFinishedArguments dayFinishedArguments) { if (OnDayFinished != null) { OnDayFinished(this, dayFinishedArguments); } }
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); }
private void Pool_OnDayFinished(object sender, StrategyDayFinishedArguments arguments) { poolDetector.DayEndExecutor(arguments.ExecutorInfo); }
private void Executor_OnStrategyDayFinished(object sender, StrategyDayFinishedArguments arguments) { IStrategyExecutorInfo executorInfo = arguments.ExecutorInfo; Console.WriteLine(executorInfo.CurrentKLineData.Code + "," + executorInfo.CurrentKLineData); }
private void Executor_OnDayFinished(object sender, StrategyDayFinishedArguments arguments) { //this.strategyExecutorInfo.CurrentDay = DealDayFinishEvent(arguments); }
private void Executor_OnDayFinished(object sender, StrategyDayFinishedArguments arguments) { Console.WriteLine(arguments.ExecutorInfo.CurrentDay + " Finished"); }