public LBR3_10_Histogram(DataSeries ds, int period1, int period2, int period3, string description) : base(ds, description) { base.FirstValidValue = Math.Max(period1, Math.Max(period2, period3)); LBR3_10 lbr3_10 = new LBR3_10(ds, period1, period2, description); LBR3_10_Signal sigLine = new LBR3_10_Signal(ds, period1, period2, period3, description); DataSeries lbrOscHist = lbr3_10 - sigLine; for (int bar = FirstValidValue; bar < ds.Count; bar++) { base[bar] = lbrOscHist[bar]; } }
public static LBR3_10_Signal Series(DataSeries ds, int period1, int period2, int period3) { string description = string.Concat(new object[] { "3/10 Oscillator Signal(", ds.Description, ",", period1, ",", period2, ",", period3, ")" }); if (ds.Cache.ContainsKey(description)) { return((LBR3_10_Signal)ds.Cache[description]); } LBR3_10_Signal _LBR3_10_Signal = new LBR3_10_Signal(ds, period1, period2, period3, description); ds.Cache[description] = _LBR3_10_Signal; return(_LBR3_10_Signal); }