private void InitializeChart() { tChart1.Aspect.View3D = false; tChart1.Header.Text = "Gator Oscillator"; tChart1.Legend.Visible = false; tChart1.Series.Add(series1); tChart1.Series.Add(series2); tChart1.Series.Add(series3); series3.UseOrigin = true; series1.FillSampleValues(200); series2.Function = new AlligatorFunction(tChart1.Chart); series3.Function = new GatorFunction(tChart1.Chart); Axis custom = new Axis(tChart1.Chart); custom.Horizontal = false; tChart1.Axes.Left.EndPosition = 60; custom.StartPosition = 60; custom.EndPosition = 100; tChart1.Axes.Custom.Add(custom); series3.CustomVertAxis = custom; series2.DataSource = series1; series3.DataSource = series1; }
private void InitializeChart() { tChart1.Aspect.View3D = false; tChart1.Series.Add(series1); tChart1.Series.Add(series2); series1.FillSampleValues(200); AOFunction func = new AOFunction(tChart1.Chart); series2.Function = func; series2.DataSource = series1; }
public override void FillSampleValues(Series serie) { base.FillSampleValues(serie); bool correcte = false; while (!correcte) { candle.FillSampleValues(20); int i = 0; bool trobat = false; while (i < candle.mandatory.Count && !trobat) { if (candle.mandatory[i] > 200) { trobat = true; } i++; } if (!trobat && (candle.mandatory[(candle.mandatory.Count - 1)] - candle.mandatory[0]) > 50) { correcte = true; } } }
private void InitializeChart() { tChart1.Aspect.View3D = false; tChart1.Header.Text = "ATR (9)"; tChart1.Legend.Visible = false; tChart1.Series.Add(series1); tChart1.Series.Add(series2); series1.FillSampleValues(200); ATRFunction func = new ATRFunction(tChart1.Chart); series2.Function = func; series2.DataSource = series1; Axis custom = new Axis(tChart1.Chart); custom.Horizontal = false; tChart1.Axes.Left.EndPosition = 70; custom.StartPosition = 70; custom.EndPosition = 100; tChart1.Axes.Custom.Add(custom); series2.CustomVertAxis = custom; }
private void FillSampleValues(Candle candle) { bool correcte = false; while (!correcte) { candle.FillSampleValues(20); int i = 0; bool trobat = false; while (i < candle.mandatory.Count && !trobat) { if (candle.mandatory[i] > 200) { trobat = true; } i++; } if (!trobat) { correcte = true; } } }
private void InitializeChart() { tChart1.Header.Text = "RVI(10)"; tChart1.Aspect.View3D = false; tChart1.Series.Add(series1); tChart1.Series.Add(series2); series1.FillSampleValues(200); func.Period = 10; series2.Function = func; Axis custom = new Axis(tChart1.Chart); custom.Horizontal = false; tChart1.Axes.Left.EndPosition = 48; custom.StartPosition = 52; custom.EndPosition = 100; tChart1.Axes.Custom.Add(custom); series2.CustomVertAxis = custom; series2.DataSource = series1; }
public CompressionOHLCProFunctionChart(ChartView BaseChart) { candle = new Candle(); candleSource = new Candle(); compressOHLC = new CompressOHLC(); var = new Variables.Variables(); this.BaseChart = BaseChart; Themes.CandleGodStyle(candle); BaseChart.Chart.Series.Add(candle); candleSource.FillSampleValues(15); candle.Function = compressOHLC; candle.DataSource = candleSource; compressOHLC.Period = 2; compressOHLC.Compress = CompressionPeriod.ocMonth; compressOHLC.Series = candleSource; BaseChart.Chart.Axes.Left.Automatic = true; BaseChart.Chart.Axes.Bottom.Automatic = true; BaseChart.Chart.Legend.Visible = false; BaseChart.Chart.Axes.Left.Increment = 15; BaseChart.Chart.Axes.Left.Ticks.Transparency = 100; ((((BaseChart.Parent as StackLayout).Parent as Grid).Parent as ContentPage).Parent as TabbedPage).Title = "Compression"; AddCompressionToolbarItem(); BaseChart.Chart.Header.Text = "Compression OHLC - " + compressionPicker.SelectedItem; }
public BollingerProFunctionChart(ChartView BaseChart) { candle = new Candle(); line = new Line(); bollingerFunction = new Bollinger(); var = new Variables.Variables(); Themes.CandleGodStyle(candle); BaseChart.Chart.Header.Text = "Bollinger Bands"; BaseChart.Chart.Series.Add(candle); BaseChart.Chart.Series.Add(line); candle.FillSampleValues(20); candle.HorizAxis = HorizontalAxis.Bottom; candle.VertAxis = VerticalAxis.Left; candle.Title = "Data Source"; line.DataSource = candle; line.Function = bollingerFunction; line.HorizAxis = HorizontalAxis.Bottom; line.VertAxis = VerticalAxis.Left; line.Title = "Bollinger"; line.LinePen.Width = 3; line.Color = var.GetPaletteBasic[2]; bollingerFunction.Deviation = 2; bollingerFunction.Exponential = false; bollingerFunction.LowBandPen.Color = var.GetPaletteBasic[3]; bollingerFunction.UpperBandPen.Color = var.GetPaletteBasic[2]; bollingerFunction.UpperBandPen.Visible = true; bollingerFunction.LowBand.Visible = true; bollingerFunction.LowBandPen.Width = 3; bollingerFunction.UpperBandPen.Width = 3; bollingerFunction.Series = candle; bollingerFunction.LowBand.XValues.DataMember = "X"; bollingerFunction.LowBand.XValues.DateTime = true; bollingerFunction.LowBand.XValues.Order = ValueListOrder.Ascending; bollingerFunction.LowBand.YValues.DataMember = "Y"; bollingerFunction.Period = 10; BaseChart.Chart.Axes.Left.Automatic = true; BaseChart.Chart.Axes.Left.Ticks.Transparency = 100; BaseChart.Chart.Axes.Bottom.SetMinMax(BaseChart.Chart.Axes.Bottom.MinXValue - 1, BaseChart.Chart.Axes.Bottom.MaxXValue + 1); BaseChart.Chart.Axes.Left.Increment = 10; }
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; }
public Function_MoneyFlow() { InitializeComponent(); tChart1.Aspect.View3D = false; Axis axis = new Axis(tChart1.Chart); axis.OtherSide = true; axis.Horizontal = false; axis.StartEndPositionUnits = PositionUnits.Percent; axis.StartPosition = 80; tChart1.Axes.Custom.Add(axis); Axis axis1 = new Axis(tChart1.Chart); axis1.OtherSide = true; axis1.Horizontal = false; axis1.StartEndPositionUnits = PositionUnits.Percent; axis1.StartPosition = 60; axis1.EndPosition = 80; tChart1.Axes.Custom.Add(axis1); tChart1.Axes.Left.EndPosition = 60; Candle candle = new Candle(tChart1.Chart); Volume volume = new Volume(tChart1.Chart); Line line = new Line(tChart1.Chart); MoneyFlowFunction func = new MoneyFlowFunction(tChart1.Chart); candle.FillSampleValues(100); volume.FillSampleValues(100); line.DataSource = candle; line.CustomVertAxis = axis; volume.CustomVertAxis = axis1; func.Series = line; func.Volume = volume; func.CMFStyle = CMFStyle.Histogram; }
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; }
private void InitializeChart() { tChart1.Aspect.View3D = false; Candle series = new Candle(tChart1.Chart); series.FillSampleValues(); Line line1 = new Line(tChart1.Chart); line1.Title = "Mov Avg"; Line line2 = new Line(tChart1.Chart); line2.Title = "Smooth Mov Avg"; line1.DataSource = series; line1.Function = new MovingAverage(); line1.Function.Period = 3; line2.DataSource = series; line2.Function = new SmoothedMovAvgFunction(); line2.Function.Period = 3; }
private void button1_Click(object sender, EventArgs e) { series.FillSampleValues(200); }
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; }
private void ChartToCreate(String item) { List <String[]> originalData = ChartData(); String[] dataPicker = new String[originalData.Count]; for (int i = 0; i < originalData.Count; i++) { dataPicker[i] = originalData[i][1]; } _customChart.ChartView.Chart.Series.RemoveAllSeries(); var imageButton = ((((this.Children[0] as ContentPage).Content as ScrollView).Content as StackLayout).Children[1] as Grid).Children[2] as Button; switch (item) { case "AREA": Area area = new Area(); area.FillSampleValues(3); _customChart.ChartView.Chart.Series.Add(area); _customChart.ImageSource = dataPicker[0]; imageButton.ImageSource = dataPicker[0]; break; #if !TEE_STD case "ARROW": Arrow arrow = new Arrow(); arrow.FillSampleValues(10); _customChart.ChartView.Chart.Series.Add(arrow); _customChart.ImageSource = dataPicker[1]; imageButton.ImageSource = dataPicker[1]; break; #endif case "BAR": Bar bar = new Bar(); bar.FillSampleValues(4); _customChart.ChartView.Chart.Series.Add(bar); _customChart.ImageSource = dataPicker[2]; imageButton.ImageSource = dataPicker[2]; break; #if !TEE_STD case "BARJOIN": BarJoin barjoin = new BarJoin(); barjoin.FillSampleValues(5); _customChart.ChartView.Chart.Series.Add(barjoin); _customChart.ImageSource = dataPicker[3]; imageButton.ImageSource = dataPicker[3]; break; case "BEZIER": Bezier bezier = new Bezier(); bezier.FillSampleValues(5); _customChart.ChartView.Chart.Series.Add(bezier); _customChart.ImageSource = dataPicker[4]; imageButton.ImageSource = dataPicker[4]; break; case "BOX": Box box = new Box(); box.FillSampleValues(3); _customChart.ChartView.Chart.Series.Add(box); _customChart.ImageSource = dataPicker[5]; imageButton.ImageSource = dataPicker[5]; break; #endif case "BUBBLES": Bubble bubble = new Bubble(); bubble.FillSampleValues(7); _customChart.ChartView.Chart.Series.Add(bubble); _customChart.ImageSource = dataPicker[6]; imageButton.ImageSource = dataPicker[6]; break; #if !TEE_STD case "CANDLE": Candle candle = new Candle(); candle.FillSampleValues(5); _customChart.ChartView.Chart.Series.Add(candle); _customChart.ImageSource = dataPicker[7]; imageButton.ImageSource = dataPicker[7]; break; case "CONTOUR": Contour countour = new Contour(); countour.FillSampleValues(1); _customChart.ChartView.Chart.Series.Add(countour); _customChart.ImageSource = dataPicker[8]; imageButton.ImageSource = dataPicker[8]; break; case "DARVAS": Darvas darvas = new Darvas(); darvas.FillSampleValues(3); _customChart.ChartView.Chart.Series.Add(darvas); _customChart.ImageSource = dataPicker[9]; imageButton.ImageSource = dataPicker[9]; break; #endif case "DONUT": Donut donut = new Donut(); donut.FillSampleValues(1); _customChart.ChartView.Chart.Series.Add(donut); _customChart.ImageSource = dataPicker[10]; imageButton.ImageSource = dataPicker[10]; break; #if !TEE_STD case "ERROR": Error error = new Error(); error.FillSampleValues(5); _customChart.ChartView.Chart.Series.Add(error); _customChart.ImageSource = dataPicker[11]; imageButton.ImageSource = dataPicker[11]; break; case "ERRORBAR": ErrorBar errorbar = new ErrorBar(); errorbar.FillSampleValues(5); _customChart.ChartView.Chart.Series.Add(errorbar); _customChart.ImageSource = dataPicker[12]; imageButton.ImageSource = dataPicker[12]; break; case "ERRORPOINT": ErrorPoint errorPoint = new ErrorPoint(); errorPoint.FillSampleValues(7); _customChart.ChartView.Chart.Series.Add(errorPoint); _customChart.ImageSource = dataPicker[13]; imageButton.ImageSource = dataPicker[13]; break; #endif case "FASTLINE": FastLine fastLine = new FastLine(); fastLine.FillSampleValues(2); _customChart.ChartView.Chart.Series.Add(fastLine); _customChart.ImageSource = dataPicker[14]; imageButton.ImageSource = dataPicker[14]; break; #if !TEE_STD case "HIGHLOW": HighLow highLow = new HighLow(); highLow.FillSampleValues(4); _customChart.ChartView.Chart.Series.Add(highLow); _customChart.ImageSource = dataPicker[15]; imageButton.ImageSource = dataPicker[15]; break; case "HISTOGRAM": Histogram histogram = new Histogram(); histogram.FillSampleValues(6); _customChart.ChartView.Chart.Series.Add(histogram); _customChart.ImageSource = dataPicker[16]; imageButton.ImageSource = dataPicker[16]; break; #endif case "HORIZAREA": HorizArea horizArea = new HorizArea(); horizArea.FillSampleValues(6); _customChart.ChartView.Chart.Series.Add(horizArea); _customChart.ImageSource = dataPicker[17]; imageButton.ImageSource = dataPicker[17]; break; case "HORIZBAR": HorizBar horizBar = new HorizBar(); horizBar.FillSampleValues(6); _customChart.ChartView.Chart.Series.Add(horizBar); _customChart.ImageSource = dataPicker[18]; imageButton.ImageSource = dataPicker[18]; break; case "HORIZLINE": HorizLine horizLine = new HorizLine(); horizLine.FillSampleValues(6); _customChart.ChartView.Chart.Series.Add(horizLine); _customChart.ImageSource = dataPicker[19]; imageButton.ImageSource = dataPicker[19]; break; #if !TEE_STD case "ISOSURFACE": IsoSurface isoSurface = new IsoSurface(); isoSurface.FillSampleValues(10); _customChart.ChartView.Chart.Series.Add(isoSurface); _customChart.ImageSource = dataPicker[20]; imageButton.ImageSource = dataPicker[20]; break; #endif case "LINE": Line line = new Line(); line.FillSampleValues(5); _customChart.ChartView.Chart.Series.Add(line); _customChart.ImageSource = dataPicker[21]; imageButton.ImageSource = dataPicker[21]; break; #if !TEE_STD case "LINEPOINT": LinePoint linePoint = new LinePoint(); linePoint.FillSampleValues(6); _customChart.ChartView.Chart.Series.Add(linePoint); _customChart.ImageSource = dataPicker[22]; imageButton.ImageSource = dataPicker[22]; break; #endif case "PIE": Pie pie = new Pie(); pie.FillSampleValues(4); _customChart.ChartView.Chart.Series.Add(pie); _customChart.ImageSource = dataPicker[23]; imageButton.ImageSource = dataPicker[23]; break; #if !TEE_STD case "SURFACE": Surface surface = new Surface(); surface.FillSampleValues(10); //surface. _customChart.ChartView.Chart.Series.Add(surface); _customChart.ImageSource = dataPicker[24]; imageButton.ImageSource = dataPicker[24]; break; case "TOWER": Tower tower = new Tower(); tower.FillSampleValues(8); _customChart.ChartView.Chart.Series.Add(tower); _customChart.ImageSource = dataPicker[25]; imageButton.ImageSource = dataPicker[25]; break; case "VOLUME": Volume volume = new Volume(); volume.FillSampleValues(9); _customChart.ChartView.Chart.Series.Add(volume); _customChart.ImageSource = dataPicker[26]; imageButton.ImageSource = dataPicker[26]; break; #endif } _customChart.ChartView.Chart.Axes.Left.Automatic = true; _customChart.ChartView.Chart.Axes.Bottom.Automatic = true; }
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; }
public MoneyFlowProFunctionChart(ChartView BaseChart) { candle = new Candle(); volume = new Volume(); line = new Line(); moneyFlowFunction = new MoneyFlowFunction(); var = new Variables.Variables(); rightAxis = new Axis(); BaseChart.Chart.Header.Text = "Money Flow Index"; BaseChart.Chart.Series.Add(candle); BaseChart.Chart.Series.Add(volume); BaseChart.Chart.Series.Add(line); Themes.CandleGodStyle(candle); Themes.CustomAxisRight(rightAxis); Themes.UpdateAxes(BaseChart.Chart.Axes.Left, BaseChart.Chart.Axes.Bottom); Themes.DoubleAxisChart(BaseChart); BaseChart.Chart.Axes.Custom.Add(rightAxis); BaseChart.Chart.Axes.Left.Automatic = true; BaseChart.Chart.Axes.Left.Ticks.Transparency = 100; BaseChart.Chart.Axes.Bottom.Automatic = true; rightAxis.Automatic = true; candle.FillSampleValues(15); candle.Title = "Candle"; candle.HorizAxis = HorizontalAxis.Bottom; candle.VertAxis = VerticalAxis.Left; volume.HorizAxis = HorizontalAxis.Bottom; volume.VertAxis = VerticalAxis.Custom; volume.CustomVertAxis = rightAxis; volume.XValues.DataMember = "X"; volume.XValues.Order = ValueListOrder.Ascending; volume.YValues.DataMember = "Y"; volume.Title = "Volume"; volume.FillSampleValues(20); volume.LinePen.Width = 3; line.HorizAxis = HorizontalAxis.Bottom; line.VertAxis = VerticalAxis.Custom; line.CustomVertAxis = rightAxis; line.DataSource = candle; line.Function = moneyFlowFunction; line.LinePen.Width = 3; line.Color = var.GetPaletteBasic[2]; line.Title = "Line"; moneyFlowFunction.Series = candle; moneyFlowFunction.Volume = volume; moneyFlowFunction.CMFStyle = CMFStyle.Histogram; moneyFlowFunction.Volume.Color = var.GetPaletteBasic[3]; BaseChart.Chart.Axes.Custom.Add(rightAxis); rightAxis.Automatic = true; BaseChart.Chart.Axes.Left.Automatic = true; BaseChart.Chart.Axes.Bottom.Automatic = true; }
public RenkoChart(ChartView BaseChart) { AuxChartView = new ChartView(); candle = new Candle(); renko = new Renko(); this.BaseChart = BaseChart; candle.FillSampleValues(12); BaseChart.Chart.Title.Text = "Renko"; BaseChart.Chart.Axes.Left.AxisPen.Visible = true; BaseChart.Chart.Axes.Left.Visible = true; BaseChart.Chart.Axes.Bottom.Visible = true; BaseChart.Chart.Series.Add(renko); BaseChart.Chart.Series.Add(candle); //renko.Clear(); for (int i = 0; i < candle.Count; i++) { renko.Add(candle.CloseValues[i]); } // box size set to 2 //renko.BoxSize = 5; //renko.Pointer.Style = PointerStyles.Rectangle; //renko.Title = "Renko (Close values)"; candle.Title = "Trading Data"; candle.HorizAxis = HorizontalAxis.Bottom; candle.VertAxis = VerticalAxis.Left; BaseChart.Chart.Axes.Left.Title.Visible = false; BaseChart.Chart.Axes.Bottom.Title.Visible = false; BaseChart.Chart.Axes.Bottom.Labels.Visible = true; BaseChart.Chart.Axes.Left.Labels.Visible = true; BaseChart.Chart.Axes.Left.AxisPen.Visible = true; BaseChart.Chart.Axes.Bottom.Visible = true; BaseChart.Chart.Axes.Bottom.Ticks.Visible = false; BaseChart.Chart.Axes.Left.Increment = 10; BaseChart.Chart.Panel.Left = 0; BaseChart.Chart.Axes.Bottom.RelativePosition = 53; BaseChart.Chart.Axes.Left.EndPosition = 47; customLeftRenko = CreateAxis(); customBottomRenko = CreateAxis(); //Themes.UpdateAxes(customLeftRenko, customBottomRenko); //BaseChart.Chart.Axes.Custom.Add(customLeftRenko); //BaseChart.Chart.Axes.Custom.Add(customBottomRenko); customLeftRenko.Horizontal = false; customLeftRenko.StartPosition = 53; customLeftRenko.EndPosition = 100; customLeftRenko.Grid = BaseChart.Chart.Axes.Left.Grid; customLeftRenko.AxisPen.Visible = true; customLeftRenko.Increment = 10; customLeftRenko.AxisPen.Color = customLeftRenko.AxisPen.GetColor().AddLuminosity(-0.2); customLeftRenko.Ticks.Transparency = 100; customBottomRenko.Horizontal = true; customBottomRenko.StartPosition = 0; customBottomRenko.EndPosition = 100; customBottomRenko.RelativePosition = 0; customBottomRenko.AxisPen.Visible = true; customBottomRenko.Ticks.Visible = false; customBottomRenko.AxisPen.Color = customBottomRenko.AxisPen.GetColor().AddLuminosity(-0.2); //renko.HorizAxis = HorizontalAxis.Bottom; //renko.VertAxis = VerticalAxis.Custom; //renko.CustomHorizAxis = customBottomRenko; //renko.CustomVertAxis = customLeftRenko; BaseChart.Chart.Axes.Bottom.Automatic = true; BaseChart.Chart.Axes.Bottom.AutomaticMaximum = true; BaseChart.Chart.Axes.Bottom.AutomaticMinimum = true; BaseChart.Chart.Axes.Left.SetMinMax(BaseChart.Chart.Axes.Left.MinYValue, BaseChart.Chart.Axes.Left.MaxYValue); customLeftRenko.SetMinMax(BaseChart.Chart.Axes.Left.MinYValue, BaseChart.Chart.Axes.Left.MaxYValue); customBottomRenko.Automatic = true; customBottomRenko.AutomaticMaximum = true; customBottomRenko.AutomaticMinimum = true; }