コード例 #1
0
ファイル: MININDEX.cs プロジェクト: oghenez/trade-software
        /// <summary>
        /// Static method to create Min Index DataSeries
        /// </summary>
        /// <param name="ds"></param>
        /// <param name="period"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        public static MININDEX Series(DataSeries 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 (MININDEX)obj;

            //Create indicator, cache it, return it
            MININDEX indicator = new MININDEX(ds, period, description);
            ds.Cache.Add(description, indicator);
            return indicator;
        }
コード例 #2
0
ファイル: MININDEX.cs プロジェクト: oghenez/trade-software
        /// <summary>
        /// Static method to create Min Index DataSeries
        /// </summary>
        /// <param name="ds"></param>
        /// <param name="period"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        public static MININDEX Series(DataSeries 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((MININDEX)obj);
            }

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

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