Beispiel #1
0
        /// <summary>
        /// Static method to create AD DataSeries
        /// </summary>
        /// <param name="ds"></param>
        /// <param name="period"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        public static AD Series(DataBars ds, string name)
        {
            //Build description
            string description = "(" + name + ")";
            //See if it exists in the cache
            object obj = ds.Cache.Find(description);
            if (obj != null) return (AD)obj;

            //Create AD, cache it, return it
            AD ad = new AD(ds, description);
            ds.Cache.Add(description, ad);
            return ad;            
        }
Beispiel #2
0
        /// <summary>
        /// Static method to create AD DataSeries
        /// </summary>
        /// <param name="ds"></param>
        /// <param name="period"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        public static AD Series(DataBars ds, string name)
        {
            //Build description
            string description = "(" + name + ")";
            //See if it exists in the cache
            object obj = ds.Cache.Find(description);

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

            //Create AD, cache it, return it
            AD ad = new AD(ds, description);

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