Example #1
0
        public LBR3_10_Signal(DataSeries ds, int period1, int period2, int period3, string description)
            : base(ds, description)
        {
            base.FirstValidValue = Math.Max(period3, Math.Max(period1, period2));
            LBR3_10 lbrOsc = new LBR3_10(ds, period1, period2, description);

            Community.Indicators.FastSMA sma = Community.Indicators.FastSMA.Series(lbrOsc, period3);

            for (int bar = FirstValidValue; bar < ds.Count; bar++)
            {
                base[bar] = sma[bar];
            }
        }
Example #2
0
        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];
            }
        }
Example #3
0
        public static LBR3_10 Series(DataSeries ds, int period1, int period2)
        {
            string description = string.Concat(new object[] { "3/10 Oscillator(", ds.Description, ",", period1, ",", period2, ")" });

            if (ds.Cache.ContainsKey(description))
            {
                return((LBR3_10)ds.Cache[description]);
            }

            LBR3_10 _LBR3_10 = new LBR3_10(ds, period1, period2, description);

            ds.Cache[description] = _LBR3_10;
            return(_LBR3_10);
        }