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

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

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

            //Create indicator, cache it, return it
            WILLR indicator = new WILLR(ds, period, description);

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