public static StochRSI Series(DataSeries ds, double rsiPeriod, double fastK_Period, double fastD_Period, string name) { //Build description string description = "(" + name + "," + rsiPeriod.ToString() + "," + fastK_Period.ToString() + "," + fastD_Period.ToString() + ")"; //See if it exists in the cache object obj = ds.Cache.Find(description); if (obj != null) { return((StochRSI)obj); } StochRSI stochRSI = new StochRSI(ds, rsiPeriod, fastK_Period, fastD_Period, description); ds.Cache.Add(description, stochRSI); return(stochRSI); }
public static StochRSI Series(DataSeries ds, double rsiPeriod, double fastK_Period, double fastD_Period, string name) { //Build description string description = "(" + name + "," + rsiPeriod.ToString()+ "," + fastK_Period.ToString() + "," + fastD_Period.ToString() + ")"; //See if it exists in the cache object obj = ds.Cache.Find(description); if( obj!=null) return (StochRSI)obj; StochRSI stochRSI = new StochRSI(ds, rsiPeriod, fastK_Period, fastD_Period, description); ds.Cache.Add(description,stochRSI); return stochRSI; }