Ejemplo n.º 1
0
        /// <summary>
        /// Static method to create Arron DataSeries
        /// </summary>
        /// <param name="ds"></param>
        /// <param name="period"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        public static RiskReward 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 (RiskReward)obj;

            //Create Aroon, cache it, return it
            RiskReward riskreward = new RiskReward(ds, period, description);
            ds.Cache.Add(description, riskreward);
            return riskreward;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Static method to create Arron DataSeries
        /// </summary>
        /// <param name="ds"></param>
        /// <param name="period"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        public static RiskReward 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((RiskReward)obj);
            }

            //Create Aroon, cache it, return it
            RiskReward riskreward = new RiskReward(ds, period, description);

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