示例#1
0
        public static BBANDS Series(DataSeries ds, double period, double kUp, double kDn, string name)
        {
            //Build description
            string description = "(" + name + "," + period.ToString() + "," + kUp.ToString() + "," + kDn.ToString() + ")";
            //See if it exists in the cache
            object obj = ds.Cache.Find(description);

            if (obj != null)
            {
                return((BBANDS)obj);
            }

            BBANDS bBands = new BBANDS(ds, period, kUp, kDn, description);

            ds.Cache.Add(description, bBands);
            return(bBands);
        }
示例#2
0
        public static BBANDS Series(DataSeries ds, double period, double kUp, double kDn, string name)
        {
            //Build description
            string description = "(" + name + "," + period.ToString() + "," + kUp.ToString() + "," + kDn.ToString() + ")";
            //See if it exists in the cache
            object obj = ds.Cache.Find(description);
            if (obj != null) return (BBANDS)obj;

            BBANDS bBands = new BBANDS(ds, period, kUp, kDn, description);
            ds.Cache.Add(description,bBands);
            return bBands;
        }