public void CreateIndicators()
        {
            var indi1 = new IndicatorRSI();
            Type indiType = indi1.GetType();
            indiType.GetProperty("Period").SetValue(indi1, 7);
            indiType.GetProperty("MarginPercent").SetValue(indi1, 10);
            indiType.GetProperty("LineColor").SetValue(indi1, Color.Yellow);
            indicators.Add(indi1);

            var indi2 = new IndicatorDiver();
            indiType = indi2.GetType();
            indiType.GetProperty("IndicatorDrawStyle").SetValue(indi2, IndicatorDiver.DrawStyle.Стрелки);
            indiType.GetProperty("DiverType").SetValue(indi2, IndicatorDiver.DivergenceType.Классические);
            indiType.GetProperty("PeriodExtremum").SetValue(indi2, 12);
            indicators.Add(indi2);
        }
Exemple #2
0
        public void CreateIndicators()
        {
            var  indi1    = new IndicatorRSI();
            Type indiType = indi1.GetType();

            indiType.GetProperty("Period").SetValue(indi1, 7);
            indiType.GetProperty("MarginPercent").SetValue(indi1, 10);
            indiType.GetProperty("LineColor").SetValue(indi1, Color.Yellow);
            indicators.Add(indi1);

            var indi2 = new IndicatorDiver();

            indiType = indi2.GetType();
            indiType.GetProperty("IndicatorDrawStyle").SetValue(indi2, IndicatorDiver.DrawStyle.Стрелки);
            indiType.GetProperty("DiverType").SetValue(indi2, IndicatorDiver.DivergenceType.Классические);
            indiType.GetProperty("PeriodExtremum").SetValue(indi2, 12);
            indicators.Add(indi2);
        }