Пример #1
0
        public void ChangeTime(double time)
        {
            int tradingDay = dataPackage_Code.GetTradingTimeReader().GetRecentTradingDay(time);

            if (!dataPackage_Code.GetTradingDayReader().IsTrade(tradingDay))
            {
                tradingDay = dataPackage_Code.GetTradingTimeReader().GetRecentTradingDay(time, true);
                //if (!dataPackage.GetTradingDayReader().IsTrade(tradingDay))
            }
            this.time       = time;
            this.tradingDay = tradingDay;
        }
Пример #2
0
 public DataNavigate_Code_KLine(IDataPackage_Code dataPackage, double time, KLinePeriod klinePeriod)
 {
     this.dataPackage   = dataPackage;
     this.klinePeriod   = klinePeriod;
     this.sessionReader = dataPackage.GetTradingTimeReader();
     this.ChangeTime(time);
 }
Пример #3
0
        public bool NavigateTo(double time)
        {
            int tradingDay = dataPackage.GetTradingTimeReader().GetRecentTradingDay(time);

            if (!dataPackage.GetTradingDayReader().IsTrade(tradingDay))
            {
                tradingDay = dataPackage.GetTradingTimeReader().GetRecentTradingDay(time, false);
                if (!dataPackage.GetTradingDayReader().IsTrade(tradingDay))
                {
                    return(false);
                }
            }
            this.time       = time;
            this.tradingDay = tradingDay;
            return(true);
        }
Пример #4
0
 public DataNavigate_Code_TimeLine(IDataPackage_Code dataPackage, double time)
 {
     this.dataPackage   = dataPackage;
     this.sessionReader = dataPackage.GetTradingTimeReader();
     this.ChangeTime(time);
 }