Beispiel #1
0
        public ACProFunctionChart(ChartView BaseChart)
        {
#if !TEE_STD
            this.acFunction = new ACFunction();
            this.candle     = new Candle();
            this.volume     = new Volume();
            this.myAxisLeft = new Axis();
            this.BaseChart  = BaseChart;
            this.var        = new Variables.Variables();

            Themes.CandleGodStyle(candle);

            BaseChart.Chart.Header.Text = "Acceleration/Deceleration Indicator (AC)";

            BaseChart.Chart.Series.Add(candle);
            BaseChart.Chart.Series.Add(volume);
            BaseChart.Chart.Axes.Custom.Add(myAxisLeft);

            BaseChart.Chart.Axes.Left.RelativePosition   = 0;
            BaseChart.Chart.Axes.Left.StartPosition      = 0;
            BaseChart.Chart.Axes.Left.EndPosition        = 55;
            BaseChart.Chart.Axes.Left.Automatic          = true;
            BaseChart.Chart.Axes.Left.Ticks.Transparency = 100;
            BaseChart.Chart.Axes.Left.Increment          = 15;

            BaseChart.Chart.Axes.Bottom.RelativePosition = 0;
            BaseChart.Chart.Axes.Bottom.StartPosition    = 0;
            BaseChart.Chart.Axes.Bottom.EndPosition      = 100;
            BaseChart.Chart.Axes.Bottom.Automatic        = true;

            myAxisLeft = Themes.CustomAxisLeft(myAxisLeft);

            FillSampleValues(candle, 20, 200);
            candle.HorizAxis = HorizontalAxis.Bottom;
            candle.VertAxis  = VerticalAxis.Left;
            candle.Title     = "Data Source";

            volume.HorizAxis      = HorizontalAxis.Bottom;
            volume.VertAxis       = VerticalAxis.Custom;
            volume.CustomVertAxis = myAxisLeft;
            volume.Function       = acFunction;
            volume.DataSource     = candle;
            volume.Title          = "AC";
            volume.LinePen.Width  = 3;

            acFunction.Period = 2;
            acFunction.Series = candle;
#endif
        }
        public MACDProFunctionChart(ChartView BaseChart)
        {
            candle   = new Candle();
            line     = new Line();
            macd     = new MACDFunction();
            leftAxis = new Axis();
            var      = new Variables.Variables();

            Themes.DoubleAxisChart(BaseChart);
            Themes.CustomAxisLeft(leftAxis);

            BaseChart.Chart.Title.Text = "Moving Average Convergence Divergence";
            BaseChart.Chart.Axes.Custom.Add(leftAxis);
            BaseChart.Chart.Axes.Left.Automatic   = true;
            BaseChart.Chart.Axes.Bottom.Automatic = true;
            BaseChart.Chart.Axes.Left.Increment   = 20;
            leftAxis.Automatic = true;
            leftAxis.Increment = 3;

            FillSampleValues(candle, 15, 250);
            candle.HorizAxis      = HorizontalAxis.Bottom;
            candle.VertAxis       = VerticalAxis.Left;
            candle.Color          = var.GetPaletteBasic[0];
            candle.Style          = CandleStyles.CandleBar;
            candle.UpCloseColor   = var.GetPaletteBasic[0];
            candle.DownCloseColor = var.GetPaletteBasic[1];
            candle.CandleWidth    = 15;
            candle.Pen.Width      = 3;
            candle.Title          = "Data Source";

            line.DataSource     = candle;
            line.Function       = macd;
            line.HorizAxis      = HorizontalAxis.Bottom;
            line.VertAxis       = VerticalAxis.Custom;
            line.CustomVertAxis = leftAxis;
            line.Title          = "Data Source";

            macd.MACDPen.Color           = var.GetPaletteBasic[2];
            macd.MACDPen.Width           = 3;
            macd.MACDExp.Color           = var.GetPaletteBasic[3];
            macd.MACDExpPen.Width        = 3;
            macd.Histogram.Color         = var.GetPaletteBasic[4];
            macd.Histogram.LinePen.Width = 3;

            BaseChart.Chart.Series.Add(candle);
            BaseChart.Chart.Series.Add(line);
        }
        public AOProFunctionChart(ChartView BaseChart)
        {
            candle         = new Candle();
            volume         = new Volume();
            aoFunction     = new AOFunction();
            var            = new Variables.Variables();
            this.BaseChart = BaseChart;
            leftAxis       = new Axis();

            Themes.CandleGodStyle(candle);
            Themes.CustomAxisLeft(leftAxis);
            leftAxis.AxisPen.Transparency = 100;
            leftAxis.Labels.Transparency  = 100;
            leftAxis.Grid.Visible         = false;

            BaseChart.Chart.Header.Text = "Awesome Oscillator (AO)";

            BaseChart.Chart.Series.Add(candle);
            BaseChart.Chart.Series.Add(volume);

            FillSampleValues(candle);

            candle.VertAxis  = VerticalAxis.Left;
            candle.HorizAxis = HorizontalAxis.Bottom;
            candle.Title     = "Data Source";

            volume.UseOrigin      = true;
            volume.DataSource     = candle;
            volume.Function       = aoFunction;
            volume.HorizAxis      = HorizontalAxis.Bottom;
            volume.VertAxis       = VerticalAxis.Custom;
            volume.CustomVertAxis = leftAxis;
            volume.Title          = "AO";
            volume.LinePen.Width  = 3;

            aoFunction.Period = 12;
            aoFunction.Series = candle;

            BaseChart.Chart.Axes.Left.Ticks.Transparency = 100;

            BaseChart.Chart.Axes.Left.SetMinMax(BaseChart.Chart.Axes.Left.MinYValue - 100, BaseChart.Chart.Axes.Left.MaxYValue + 10);
            BaseChart.Chart.Axes.Left.Increment   = 20;
            BaseChart.Chart.Axes.Bottom.Automatic = true;
            BaseChart.Chart.Axes.Custom.Add(leftAxis);
        }
Beispiel #4
0
        public CCIProFunctionChart(ChartView BaseChart)
        {
            candle      = new Candle();
            line        = new Line();
            cciFunction = new CCIFunction();
            var         = new Variables.Variables();
            leftAxis    = new Axis();

            Themes.CandleGodStyle(candle);

            BaseChart.Chart.Header.Text = "Commodity Channel Index (CCI)";

            BaseChart.Chart.Series.Add(candle);
            BaseChart.Chart.Series.Add(line);

            Themes.DoubleAxisChart(BaseChart);
            Themes.CustomAxisLeft(leftAxis);

            candle.FillSampleValues(15);
            candle.HorizAxis = HorizontalAxis.Bottom;
            candle.VertAxis  = VerticalAxis.Left;
            candle.Title     = "Data Source";

            line.DataSource     = candle;
            line.Function       = cciFunction;
            line.HorizAxis      = HorizontalAxis.Bottom;
            line.VertAxis       = VerticalAxis.Custom;
            line.CustomVertAxis = leftAxis;
            line.Title          = "CCI";
            line.LinePen.Width  = 3;
            line.Color          = var.GetPaletteBasic[2];

            cciFunction.Series      = candle;
            cciFunction.Period      = 4;
            cciFunction.Constant    = 0.005;
            cciFunction.PeriodStyle = PeriodStyles.Range;

            BaseChart.Chart.Axes.Left.SetMinMax(BaseChart.Chart.Axes.Left.MinYValue - 30, BaseChart.Chart.Axes.Left.MaxYValue + 30);
            BaseChart.Chart.Axes.Left.Ticks.Transparency = 100;
            BaseChart.Chart.Axes.Bottom.Automatic        = true;
            BaseChart.Chart.Axes.Custom.Add(leftAxis);

            leftAxis.Automatic = true;
        }
Beispiel #5
0
        public ATRProFunctionChart(ChartView BaseChart)
        {
            candle         = new Candle();
            line           = new Line();
            atrFunction    = new ATRFunction();
            var            = new Variables.Variables();
            this.BaseChart = BaseChart;
            leftAxis       = new Axis();

            BaseChart.Chart.Axes.Custom.Add(leftAxis);

            Themes.CandleGodStyle(candle);
            Themes.CustomAxisLeft(leftAxis);
            Themes.DoubleAxisChart(BaseChart);
            leftAxis.Automatic = true;

            BaseChart.Chart.Header.Text = "Average True Range Indicator (ATR)";

            BaseChart.Chart.Series.Add(candle);
            BaseChart.Chart.Series.Add(line);

            candle.FillSampleValues(40);

            candle.VertAxis  = VerticalAxis.Left;
            candle.HorizAxis = HorizontalAxis.Bottom;
            candle.Title     = "Data Source";

            line.DataSource     = candle;
            line.Function       = atrFunction;
            line.VertAxis       = VerticalAxis.Custom;
            line.CustomVertAxis = leftAxis;
            line.HorizAxis      = HorizontalAxis.Bottom;
            line.Title          = "ATR";
            line.LinePen.Width  = 3;
            line.Color          = var.GetPaletteBasic[2];

            atrFunction.Period = 10;
            atrFunction.Series = candle;

            BaseChart.Chart.Axes.Left.Automatic   = true;
            BaseChart.Chart.Axes.Bottom.Automatic = true;
        }
        public RVIProFunctionChart(ChartView BaseChart)
        {
            candle      = new Candle();
            line        = new Line();
            rviFunction = new RVIFunction();
            var         = new Variables.Variables();
            leftAxis    = new Axis();

            Themes.CandleGodStyle(candle);
            Themes.DoubleAxisChart(BaseChart);
            Themes.CustomAxisLeft(leftAxis);

            BaseChart.Chart.Title.Text = "Relative Vigor Index";
            BaseChart.Chart.Axes.Custom.Add(leftAxis);
            BaseChart.Chart.Axes.Left.Automatic          = true;
            BaseChart.Chart.Axes.Left.Ticks.Transparency = 100;
            BaseChart.Chart.Axes.Bottom.Automatic        = true;
            leftAxis.Increment = 0.1;
            leftAxis.Automatic = true;

            FillSampleValues(candle, 20);
            candle.Title     = "DataSouce";
            candle.HorizAxis = HorizontalAxis.Bottom;
            candle.VertAxis  = VerticalAxis.Left;

            line.Title          = "RVI";
            line.DataSource     = candle;
            line.Function       = rviFunction;
            line.Color          = var.GetPaletteBasic[2];
            line.LinePen.Width  = 3;
            line.HorizAxis      = HorizontalAxis.Bottom;
            line.VertAxis       = VerticalAxis.Custom;
            line.CustomVertAxis = leftAxis;

            rviFunction.Period               = 10;
            rviFunction.Signal.Visible       = true;
            rviFunction.Signal.LinePen.Width = 3;
            rviFunction.Signal.Color         = var.GetPaletteBasic[3];

            BaseChart.Chart.Series.Add(candle);
            BaseChart.Chart.Series.Add(line);
        }
        public MomentumDivProFunctionChart(ChartView BaseChart)
        {
            line1            = new Line();
            line2            = new Line();
            momentumDivision = new MomentumDivision();
            var      = new Variables.Variables();
            leftAxis = new Axis();

            Themes.DoubleAxisChart(BaseChart);
            Themes.CustomAxisLeft(leftAxis);

            BaseChart.Chart.Title.Text                   = "Momentum";
            leftAxis.Automatic                           = true;
            BaseChart.Chart.Axes.Left.Automatic          = true;
            BaseChart.Chart.Axes.Bottom.Automatic        = true;
            BaseChart.Chart.Axes.Left.Ticks.Transparency = 100;
            BaseChart.Chart.Axes.Custom.Add(leftAxis);

            FillSampleValues(line1, 30, 600);
            line1.Color           = var.GetPaletteBasic[0];
            line1.LinePen.Width   = 3;
            line1.Pointer.Visible = true;
            line1.Title           = "Data Source";
            line1.HorizAxis       = HorizontalAxis.Bottom;
            line1.VertAxis        = VerticalAxis.Left;

            line2.LinePen.Width  = 3;
            line2.DataSource     = line1;
            line2.Function       = momentumDivision;
            line2.Title          = "Momentum Divison";
            line2.HorizAxis      = HorizontalAxis.Bottom;
            line2.VertAxis       = VerticalAxis.Custom;
            line2.CustomVertAxis = leftAxis;
            line2.Color          = var.GetPaletteBasic[1];

            momentumDivision.Period = 10;

            BaseChart.Chart.Series.Add(line1);
            BaseChart.Chart.Series.Add(line2);
        }
        public ADXProFunctionChart(ChartView BaseChart)
        {
            this.adxFunction = new ADXFunction();
            this.candle      = new Candle();
            this.line        = new Line();
            this.myAxisLeft  = new Axis();
            this.BaseChart   = BaseChart;
            this.var         = new Variables.Variables();

            Themes.CandleGodStyle(candle);

            BaseChart.Chart.Header.Text = "Average Directional Change (ADX)";

            BaseChart.Chart.Series.Add(candle);
            BaseChart.Chart.Series.Add(line);
            BaseChart.Chart.Axes.Custom.Add(myAxisLeft);

            BaseChart.Chart.Axes.Left.RelativePosition = 0;
            BaseChart.Chart.Axes.Left.StartPosition    = 0;
            BaseChart.Chart.Axes.Left.EndPosition      = 55;
            //BaseChart.Chart.Axes.Left.Automatic = true;
            BaseChart.Chart.Axes.Left.Ticks.Transparency = 100;
            BaseChart.Chart.Axes.Left.Increment          = 20;

            BaseChart.Chart.Axes.Bottom.RelativePosition = 0;
            BaseChart.Chart.Axes.Bottom.StartPosition    = 0;
            BaseChart.Chart.Axes.Bottom.EndPosition      = 100;
            //BaseChart.Chart.Axes.Bottom.Automatic = true;

            myAxisLeft = Themes.CustomAxisLeft(myAxisLeft);

            FillSampleValues(candle);
            candle.HorizAxis = HorizontalAxis.Bottom;
            candle.VertAxis  = VerticalAxis.Left;
            candle.Title     = "Data Source";

            line.HorizAxis      = HorizontalAxis.Bottom;
            line.VertAxis       = VerticalAxis.Custom;
            line.CustomVertAxis = myAxisLeft;
            line.Function       = adxFunction;
            line.DataSource     = candle;
            line.Title          = "ADX";
            line.LinePen.Width  = 3;
            line.Color          = var.GetPaletteBasic[4];

            adxFunction.Period                = 2;
            adxFunction.DMDown.Color          = System.Drawing.Color.FromArgb(((int)(((byte)(78)))), ((int)(((byte)(151)))), ((int)(((byte)(168)))));
            adxFunction.DMDown.ColorEach      = false;
            adxFunction.DMDown.CustomVertAxis = myAxisLeft;
            adxFunction.DMDown.LinePen.Color  = var.GetPaletteBasic[2];
            adxFunction.DMDown.LinePen.Width  = 3;
            adxFunction.DMDown.Marks.Brush.Gradient.EndColor    = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(0)))));
            adxFunction.DMDown.Marks.Brush.Gradient.MiddleColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            adxFunction.DMDown.Marks.Brush.Gradient.StartColor  = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            adxFunction.DMDown.Marks.Callout.ArrowHead          = ArrowHeadStyles.None;
            adxFunction.DMDown.Marks.Callout.ArrowHeadSize      = 8;
            adxFunction.DMDown.Marks.Callout.Brush.Color        = System.Drawing.Color.Black;
            adxFunction.DMDown.Marks.Callout.Distance           = 0;
            adxFunction.DMDown.Marks.Callout.Draw3D             = false;
            adxFunction.DMDown.Marks.Callout.Length             = 10;
            adxFunction.DMDown.Marks.Callout.Style    = PointerStyles.Rectangle;
            adxFunction.DMDown.Marks.Callout.Visible  = false;
            adxFunction.DMDown.Marks.Font.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            adxFunction.DMDown.Marks.Transparent      = true;
            adxFunction.DMDown.Legend.Visible         = false;
            adxFunction.DMDown.Title              = "DMDown";
            adxFunction.DMDown.TreatNulls         = TreatNullsStyle.Ignore;
            adxFunction.DMDown.VertAxis           = VerticalAxis.Custom;
            adxFunction.DMDown.CustomVertAxis     = myAxisLeft;
            adxFunction.DMDown.XValues.DataMember = "X";
            adxFunction.DMDown.XValues.DateTime   = true;
            adxFunction.DMDown.XValues.Order      = ValueListOrder.Ascending;
            adxFunction.DMDown.YValues.DataMember = "Y";

            adxFunction.DMUp.Color         = System.Drawing.Color.FromArgb(((int)(((byte)(241)))), ((int)(((byte)(76)))), ((int)(((byte)(20)))));
            adxFunction.DMUp.ColorEach     = false;
            adxFunction.DMUp.LinePen.Color = var.GetPaletteBasic[3];
            adxFunction.DMUp.LinePen.Width = 3;
            adxFunction.DMUp.Marks.Brush.Gradient.EndColor    = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(0)))));
            adxFunction.DMUp.Marks.Brush.Gradient.MiddleColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            adxFunction.DMUp.Marks.Brush.Gradient.StartColor  = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            adxFunction.DMUp.Marks.Callout.ArrowHead          = ArrowHeadStyles.None;
            adxFunction.DMUp.Marks.Callout.ArrowHeadSize      = 8;
            adxFunction.DMUp.Marks.Callout.Brush.Color        = System.Drawing.Color.Black;
            adxFunction.DMUp.Marks.Callout.Distance           = 0;
            adxFunction.DMUp.Marks.Callout.Draw3D             = false;
            adxFunction.DMUp.Marks.Callout.Length             = 10;
            adxFunction.DMUp.Marks.Callout.Style    = PointerStyles.Rectangle;
            adxFunction.DMUp.Marks.Callout.Visible  = false;
            adxFunction.DMUp.Marks.Font.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            adxFunction.DMUp.Marks.Transparent      = true;
            adxFunction.DMUp.Legend.Visible         = false;
            adxFunction.DMUp.Title              = "DMUp";
            adxFunction.DMUp.TreatNulls         = TreatNullsStyle.Ignore;
            adxFunction.DMUp.VertAxis           = VerticalAxis.Custom;
            adxFunction.DMUp.CustomVertAxis     = myAxisLeft;
            adxFunction.DMUp.XValues.DataMember = "X";
            adxFunction.DMUp.XValues.DateTime   = true;
            adxFunction.DMUp.XValues.Order      = ValueListOrder.Ascending;
            adxFunction.DMUp.YValues.DataMember = "Y";

            BaseChart.Chart.Axes.Left.SetMinMax(BaseChart.Chart.Axes.Left.MinYValue - 10, BaseChart.Chart.Axes.Left.MaxYValue + 10);
            BaseChart.Chart.Axes.Bottom.SetMinMax(BaseChart.Chart.Axes.Bottom.MinXValue - 1, BaseChart.Chart.Axes.Bottom.MaxXValue + 1);
        }
        public OBVProFunctionChart(ChartView BaseChart)
        {
            candle      = new Candle();
            volume      = new Volume();
            line        = new Line();
            obvFunction = new OBVFunction();
            var         = new Variables.Variables();
            midLeftAxis = new Axis();
            botLeftAxis = new Axis();

            Themes.CandleGodStyle(candle);
            Themes.CustomAxisLeft(midLeftAxis);
            Themes.CustomAxisLeft(botLeftAxis);
            Themes.UpdateAxes(BaseChart.Chart.Axes.Left, BaseChart.Chart.Axes.Right);
            Themes.TripleAxisChart(BaseChart, midLeftAxis, botLeftAxis);
            BaseChart.Chart.Axes.Custom.Add(midLeftAxis);
            BaseChart.Chart.Axes.Custom.Add(botLeftAxis);

            BaseChart.Chart.Title.Text = "On Balance Volume";

            BaseChart.Chart.Series.Add(candle);
            BaseChart.Chart.Series.Add(volume);
            BaseChart.Chart.Series.Add(line);

            candle.FillSampleValues(20);
            candle.HorizAxis = HorizontalAxis.Bottom;
            candle.VertAxis  = VerticalAxis.Left;
            candle.Title     = "Candle";

            volume.HorizAxis          = HorizontalAxis.Bottom;
            volume.VertAxis           = VerticalAxis.Custom;
            volume.CustomVertAxis     = midLeftAxis;
            volume.XValues.DataMember = "X";
            volume.XValues.Order      = ValueListOrder.Ascending;
            volume.YValues.DataMember = "Y";
            volume.Title = "Volume";
            volume.FillSampleValues(20);
            volume.LinePen.Width = 3;
            volume.Color         = var.GetPaletteBasic[3];

            line.HorizAxis      = HorizontalAxis.Bottom;
            line.VertAxis       = VerticalAxis.Custom;
            line.CustomVertAxis = botLeftAxis;
            line.DataSource     = candle;
            line.Function       = obvFunction;
            line.Title          = "CLV Function";
            line.LinePen.Width  = 3;
            line.Color          = var.GetPaletteBasic[2];

            obvFunction.Period = 1;
            obvFunction.Series = candle;
            obvFunction.Volume = volume;

            BaseChart.Chart.Axes.Custom.Add(midLeftAxis);
            BaseChart.Chart.Axes.Custom.Add(botLeftAxis);


            midLeftAxis.Automatic = true;
            botLeftAxis.Automatic = true;
            BaseChart.Chart.Axes.Left.Automatic   = true;
            BaseChart.Chart.Axes.Bottom.Automatic = true;
        }
Beispiel #10
0
        public GatorOscillProFunctionChart(ChartView BaseChart)
        {
            candle    = new Candle();
            line      = new Line();
            alligator = new AlligatorFunction();
            volume    = new Volume();
            gator     = new GatorFunction();
            var       = new Variables.Variables();
            leftAxis  = new Axis();

            BaseChart.Chart.Title.Text = "Gator Oscillator";

            Themes.CandleGodStyle(candle);
            Themes.DoubleAxisChart(BaseChart);
            Themes.CustomAxisLeft(leftAxis);

            FillSampleValues(candle, 60, 200);

            candle.Title              = "Data Source";
            candle.HorizAxis          = HorizontalAxis.Bottom;
            candle.VertAxis           = VerticalAxis.Left;
            candle.Marks.Transparency = 100;

            line.Title           = "Alligator";
            line.DataSource      = candle;
            line.Function        = alligator;
            line.HorizAxis       = HorizontalAxis.Bottom;
            line.VertAxis        = VerticalAxis.Left;
            line.LinePen.Width   = 2;
            line.Marks.DrawEvery = 8;

            FillSampleValues(volume, 15);
            volume.Title           = "Gator";
            volume.UseOrigin       = true;
            volume.DataSource      = candle;
            volume.Function        = gator;
            volume.HorizAxis       = HorizontalAxis.Bottom;
            volume.VertAxis        = VerticalAxis.Custom;
            volume.CustomVertAxis  = leftAxis;
            volume.LinePen.Width   = 2;
            volume.Marks.DrawEvery = 5;

            alligator.LipsPen.Color         = var.GetPaletteBasic[2];
            alligator.LipsPen.Width         = 3;
            alligator.TeethPen.Color        = var.GetPaletteBasic[3];
            alligator.TeethPen.Width        = 3;
            alligator.Lips.Marks.DrawEvery  = 5;
            alligator.Teeth.Marks.DrawEvery = 5;

            gator.Bottom.Marks.Transparency = 100;

            leftAxis.Automatic = true;
            leftAxis.Increment = 1;
            BaseChart.Chart.Axes.Left.Automatic          = true;
            BaseChart.Chart.Axes.Left.Ticks.Transparency = 100;
            BaseChart.Chart.Axes.Custom.Add(leftAxis);
            BaseChart.Chart.Axes.Bottom.Automatic = true;
            BaseChart.Chart.Legend.Visible        = false;
            BaseChart.Chart.Axes.Left.Increment   = 10;

            BaseChart.Chart.Series.Add(candle);
            BaseChart.Chart.Series.Add(line);
            BaseChart.Chart.Series.Add(volume);
        }
Beispiel #11
0
        public CLVProFunctionChart(ChartView BaseChart)
        {
            candle         = new Candle();
            volume         = new Volume();
            line           = new Line();
            clvFunction    = new CLVFunction();
            var            = new Variables.Variables();
            leftBottomAxis = new Axis();
            leftCenterAxis = new Axis();

            Themes.CandleGodStyle(candle);

            BaseChart.Chart.Header.Text = "Accumulation / Distribution Line";

            BaseChart.Chart.Series.Add(candle);
            BaseChart.Chart.Series.Add(volume);
            BaseChart.Chart.Series.Add(line);

            Themes.CustomAxisLeft(leftCenterAxis);
            Themes.CustomAxisLeft(leftBottomAxis);
            Themes.UpdateAxes(BaseChart.Chart.Axes.Left, BaseChart.Chart.Axes.Bottom);
            Themes.TripleAxisChart(BaseChart, leftCenterAxis, leftBottomAxis);

            candle.FillSampleValues(20);
            candle.HorizAxis = HorizontalAxis.Bottom;
            candle.VertAxis  = VerticalAxis.Left;
            candle.Title     = "Candle";

            volume.HorizAxis          = HorizontalAxis.Bottom;
            volume.VertAxis           = VerticalAxis.Custom;
            volume.CustomVertAxis     = leftCenterAxis;
            volume.XValues.DataMember = "X";
            volume.XValues.Order      = ValueListOrder.Ascending;
            volume.YValues.DataMember = "Y";
            volume.Title = "Volume";
            volume.FillSampleValues(20);
            volume.LinePen.Width = 3;
            volume.Color         = var.GetPaletteBasic[3];

            line.HorizAxis      = HorizontalAxis.Bottom;
            line.VertAxis       = VerticalAxis.Custom;
            line.CustomVertAxis = leftBottomAxis;
            line.DataSource     = candle;
            line.Function       = clvFunction;
            line.Title          = "CLV Function";
            line.LinePen.Width  = 3;
            line.Color          = var.GetPaletteBasic[2];

            clvFunction.Accumulate = true;
            clvFunction.Period     = 1;
            clvFunction.Series     = candle;
            clvFunction.Volume     = volume;

            BaseChart.Chart.Axes.Custom.Add(leftCenterAxis);
            BaseChart.Chart.Axes.Custom.Add(leftBottomAxis);

            leftBottomAxis.Automatic              = true;
            leftCenterAxis.Automatic              = true;
            BaseChart.Chart.Axes.Left.Automatic   = true;
            BaseChart.Chart.Axes.Bottom.Automatic = true;
        }