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