Пример #1
0
        public static KELTNER Series(DataBars ds, double EmaPeriod, double AtrMult, double AtrPeriod, string name)
        {
            //Build description
            string description = "(" + name + "," + EmaPeriod.ToString() + "," + AtrMult.ToString() + "," + AtrPeriod.ToString() + ")";
            //See if it exists in the cache
            object obj = ds.Cache.Find(description);
            if (obj != null) return (KELTNER)obj;

            KELTNER indicator = new KELTNER(ds, EmaPeriod, AtrMult, AtrPeriod, description);
            ds.Cache.Add(description,indicator);
            return indicator;
        }
Пример #2
0
        public static KELTNER Series(DataBars ds, double EmaPeriod, double AtrMult, double AtrPeriod, string name)
        {
            //Build description
            string description = "(" + name + "," + EmaPeriod.ToString() + "," + AtrMult.ToString() + "," + AtrPeriod.ToString() + ")";
            //See if it exists in the cache
            object obj = ds.Cache.Find(description);

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

            KELTNER indicator = new KELTNER(ds, EmaPeriod, AtrMult, AtrPeriod, description);

            ds.Cache.Add(description, indicator);
            return(indicator);
        }