Пример #1
0
        /// <summary>
        /// Static method to create Thrust DataSeries
        /// </summary>
        /// <param name="ds"></param>
        /// <param name="period"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        public static Market_Thrust Series(DataSeries 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((Market_Thrust)obj);
            }

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

            ds.Cache.Add(description, indicator);
            return(indicator);
        }
Пример #2
0
        /// <summary>
        /// Static method to create Thrust DataSeries
        /// </summary>
        /// <param name="ds"></param>
        /// <param name="period"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        public static Market_Thrust Series(DataSeries 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 (Market_Thrust)obj;

            //Create indicator, cache it, return it
            Market_Thrust indicator = new Market_Thrust(ds, description);
            ds.Cache.Add(description, indicator);
            return indicator;
        }