Пример #1
0
        public static Stoch Series(DataBars db, double fastK_Period, double slowK_Period, double slowD_Period, string name)
        {
            //Build description
            string description = "(" + name + "," + fastK_Period.ToString() + "," + slowK_Period.ToString() + "," + slowD_Period.ToString() + ")";
            //See if it exists in the cache
            object obj = db.Cache.Find(description);

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

            Stoch stoch = new Stoch(db, fastK_Period, slowK_Period, slowD_Period, description);

            db.Cache.Add(description, stoch);
            return(stoch);
        }
Пример #2
0
        public static Stoch Series(DataBars db, double fastK_Period, double slowK_Period, double slowD_Period, string name)
        {
            //Build description
            string description = "(" + name + "," + fastK_Period.ToString() + "," + slowK_Period.ToString() + "," + slowD_Period.ToString() + ")";
            //See if it exists in the cache
            object obj = db.Cache.Find(description);
            if (obj != null) return (Stoch)obj;

            Stoch stoch = new Stoch(db, fastK_Period, slowK_Period, slowD_Period, description);
            db.Cache.Add(description,stoch);
            return stoch;
        }