Exemple #1
0
        /// <summary>
        /// Static method to create MEDPRICE DataSeries
        /// </summary>
        /// <param name="ds"></param>
        /// <param name="period"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        public static MEDPRICE 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 (MEDPRICE)obj;

            //Create indicator, cache it, return it
            MEDPRICE indicator = new MEDPRICE(ds, description);
            ds.Cache.Add(description, indicator);
            return indicator;
        }
Exemple #2
0
        /// <summary>
        /// Static method to create MEDPRICE DataSeries
        /// </summary>
        /// <param name="ds"></param>
        /// <param name="period"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        public static MEDPRICE 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((MEDPRICE)obj);
            }

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

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