Esempio n. 1
0
        internal static PriceTick?Create(string[] row, LocalTime time, DateTimeZone tz)
        {
            var tick = new PriceTick(row, time, tz);

            if (tick.Open == 0 && tick.High == 0 && tick.Low == 0 && tick.Close == 0 &&
                tick.AdjustedClose == 0 && tick.Volume == 0)
            {
                return(null);
            }

            return(tick);
        }
Esempio n. 2
0
 internal static object?Parse(string param, string[] row, LocalTime time, DateTimeZone tz)
 {
     if (param == "history")
     {
         return(PriceTick.Create(row, time, tz));
     }
     if (param == "div")
     {
         return(DividendTick.Create(row, time, tz));
     }
     if (param == "split")
     {
         return(SplitTick.Create(row, time, tz));
     }
     throw new Exception("Parse<T>: invalid type.");
 }