Ejemplo n.º 1
0
        public WMA WMA(object obj, int period)
        {
            WMA wma = new WMA(obj, period);

            model.AddDependency(wma);
            return(wma);
        }
Ejemplo n.º 2
0
        public override void OnInitialize()
        {
            Name              = "HMA";
            Drawing.Color     = Color.Green;
            Drawing.PaneType  = PaneType.Primary;
            Drawing.IsVisible = true;

            halfPeriod = (Math.Ceiling(Convert.ToDouble(Period * 0.5)) - (Convert.ToDouble(Period * 0.5)) <= 0.5) ? Math.Ceiling(Convert.ToDouble(Period * 0.5)) : Math.Floor(Convert.ToDouble(Period * 0.5));
            sqrtPeriod = (Math.Ceiling(Math.Sqrt(Convert.ToDouble(Period))) - Math.Sqrt(Convert.ToDouble(Period)) <= 0.5) ? Math.Ceiling(Math.Sqrt(Convert.ToDouble(Period))) : Math.Floor(Math.Sqrt(Convert.ToDouble(Period)));
            W1         = Formula.WMA(Input, Convert.ToInt32(halfPeriod));
            W2         = Formula.WMA(Input, Period);
            W3         = Formula.WMA(2D * W1[0] - W2[0], Convert.ToInt32(sqrtPeriod));
        }
Ejemplo n.º 3
0
        public override void OnInitialize()
        {
            Name              = "IFT";
            Drawing.PaneType  = PaneType.Secondary;
            Drawing.IsVisible = true;

            value1 = Formula.Indicator();
            value2 = Formula.Indicator();
            rsi    = Formula.RSI(Input, period);
            wma    = Formula.WMA(value1, period);
            Formula.Line(0.5, Color.LightGreen);
            Formula.Line(-0.5, Color.Red);
        }
Ejemplo n.º 4
0
        public override void OnInitialize()
        {
            Name = "IFT";
            // Display below the price chart
            Drawing.PaneType = PaneType.Secondary;
            // Display below the price chart
            Drawing.IsVisible = true;

            // Creates the
            value1 = Formula.Indicator();
            value2 = Formula.Indicator();
            rsi    = Formula.RSI(Bars.Close, 5);
            wma    = Formula.WMA(value1, 5);
            Formula.Line(0.5, Color.LightGreen);
            Formula.Line(-0.5, Color.Red);
        }