protected static baseSMA Series(DataSeries ds, Types type, double period, string name) { //Build description string description = "(" + name + "," + period + ")"; //See if it exists in the cache object obj = ds.Cache.Find(description); if (obj!=null) return (baseSMA)obj; //Create SMA, cache it, return it baseSMA sma = new baseSMA(ds, type, period, description); ds.Cache.Add(description,sma); return sma; }
protected static baseSMA Series(DataSeries ds, Types type, double period, string name) { //Build description string description = "(" + name + "," + period + ")"; //See if it exists in the cache object obj = ds.Cache.Find(description); if (obj != null) { return((baseSMA)obj); } //Create SMA, cache it, return it baseSMA sma = new baseSMA(ds, type, period, description); ds.Cache.Add(description, sma); return(sma); }