コード例 #1
0
        public WoodiesCCI()
            : base(true)
        {
            TrendCCIPeriod = 14;
            EntryCCIPeriod = 6;
            _trendCci.DataSeries[0].Name = "Trend CCI";
            _entryCci.DataSeries[0].Name = "Entry CCI";
            Panel = IndicatorDataProvider.NewPanel;
            ((ValueDataSeries)_entryCci.DataSeries[0]).Color = Colors.Orange;
            ((ValueDataSeries)_trendCci.DataSeries[0]).Width = 2;
            ((ValueDataSeries)_trendCci.DataSeries[0]).Color = Color.FromArgb(255, 69, 23, 69);

            DataSeries.Add(_cciTrendUp);
            DataSeries.Add(_cciTrendDown);
            DataSeries.Add(_cciNoTrend);
            DataSeries.Add(_cciTimeBar);

            DataSeries.Add(_trendCci.DataSeries[0]);
            DataSeries.Add(_entryCci.DataSeries[0]);

            DataSeries.Add(_negativeLsma);
            DataSeries.Add(_positiveLsma);

            ((ValueDataSeries)DataSeries[0]).ShowCurrentValue = false;
            ((ValueDataSeries)DataSeries[0]).Name             = "Zero Line";
            ((ValueDataSeries)DataSeries[0]).Color            = Colors.Gray;
            ((ValueDataSeries)DataSeries[0]).VisualType       = VisualMode.Hide;

            LineSeries.Add(new LineSeries("100")
            {
                Color         = Colors.Gray,
                LineDashStyle = LineDashStyle.Dash,
                Value         = 100,
                Width         = 1
            });
            LineSeries.Add(new LineSeries("200")
            {
                Color         = Colors.Gray,
                LineDashStyle = LineDashStyle.Dash,
                Value         = 200,
                Width         = 1
            });
            LineSeries.Add(new LineSeries("300")
            {
                Color         = Colors.Gray,
                LineDashStyle = LineDashStyle.Dash,
                Value         = 300,
                Width         = 1,
                UseScale      = true
            });
            LineSeries.Add(new LineSeries("-100")
            {
                Color         = Colors.Gray,
                LineDashStyle = LineDashStyle.Dash,
                Value         = -100,
                Width         = 1
            });
            LineSeries.Add(new LineSeries("-200")
            {
                Color         = Colors.Gray,
                LineDashStyle = LineDashStyle.Dash,
                Value         = -200,
                Width         = 1
            });
            LineSeries.Add(new LineSeries("-300")
            {
                Color         = Colors.Gray,
                LineDashStyle = LineDashStyle.Dash,
                Value         = -300,
                Width         = 1,
                UseScale      = true
            });

            Add(_trendCci);
            Add(_entryCci);
        }