Exemplo n.º 1
0
        /// <summary>
        /// Static method to create Harami DataSeries
        /// </summary>
        /// <param name="ds"></param>
        /// <param name="period"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        public static CdlMorningStar Series(DataBars ds, double optInPenetration, string name)
        {
            //Build description
            string description = "(" + name + ")";
            //See if it exists in the cache
            object obj = ds.Cache.Find(description);

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

            //Create Doji, cache it, return it
            CdlMorningStar indicator = new CdlMorningStar(ds, optInPenetration, description);

            ds.Cache.Add(description, indicator);
            return(indicator);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Static method to create Harami DataSeries
        /// </summary>
        /// <param name="ds"></param>
        /// <param name="period"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        public static CdlMorningStar Series(DataBars ds,double optInPenetration, string name)
        {
            //Build description
            string description = "(" + name + ")";
            //See if it exists in the cache
            object obj = ds.Cache.Find(description);
            if (obj != null) return (CdlMorningStar)obj;

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