Exemplo n.º 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;
        }
Exemplo n.º 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);
 }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
 public DataNavigate_Code_TimeLine(IDataPackage_Code dataPackage, double time)
 {
     this.dataPackage   = dataPackage;
     this.sessionReader = dataPackage.GetTradingTimeReader();
     this.ChangeTime(time);
 }