재 커밋
This commit is contained in:
@@ -185,9 +185,9 @@ namespace Million.HunterSubForm
|
||||
|
||||
if (hitInfo.HitInfoType != HitInfoType.Cell) return;
|
||||
|
||||
var selectedResultData = (AnalysisData)treeList.GetDataRecordByNode(hitInfo.Node);
|
||||
var selectedAnalysisData = (AnalysisData)treeList.GetDataRecordByNode(hitInfo.Node);
|
||||
|
||||
Million.SubForm.ChartViewerForm chartViewerForm = new Million.SubForm.ChartViewerForm();
|
||||
Million.SubForm.ChartViewerForm chartViewerForm = new Million.SubForm.ChartViewerForm(selectedAnalysisData);
|
||||
chartViewerForm.Visible = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace Million
|
||||
/// <param name="e"></param>
|
||||
private void barButtonItem_CharView_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
|
||||
{
|
||||
ChartViewerForm chartViewerForm = new ChartViewerForm();
|
||||
ChartViewerForm chartViewerForm = new ChartViewerForm(null);
|
||||
|
||||
chartViewerForm.Show();
|
||||
}
|
||||
|
||||
@@ -72,6 +72,7 @@ namespace Million.Manager
|
||||
market = tableList.FirstOrDefault(t => t.CoinFullName == "KRW-BTC");
|
||||
}
|
||||
|
||||
|
||||
var distinctIndicator = Distinct(totalIndicators);
|
||||
|
||||
// 총 데이터
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
DevExpress.XtraEditors.DateEdit, DevExpress.XtraEditors.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraTreeList.TreeList, DevExpress.XtraTreeList.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.RangeTrackBarControl, DevExpress.XtraEditors.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.DateEdit, DevExpress.XtraEditors.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraCharts.ChartControl, DevExpress.XtraCharts.v18.2.UI, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraTreeList.TreeList, DevExpress.XtraTreeList.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v18.2, Version=18.2.8.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
|
||||
@@ -31,6 +31,9 @@ namespace Million.SubForm
|
||||
initForm();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 폼 초기화
|
||||
/// </summary>
|
||||
private void initForm()
|
||||
{
|
||||
// 지표 ComboBox 초기화
|
||||
@@ -48,6 +51,9 @@ namespace Million.SubForm
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
private void comboBoxEdit_IndicatorSelection_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
var comboboxEdit = sender as ComboBoxEdit;
|
||||
|
||||
@@ -20,10 +20,14 @@ namespace Million.SubForm
|
||||
public partial class ChartViewerForm : DevExpress.XtraEditors.XtraForm
|
||||
{
|
||||
ChartViewerUI chartViewerUi = null;
|
||||
public ChartViewerForm()
|
||||
AnalysisData _selectedAnalysisData = null;
|
||||
|
||||
public ChartViewerForm(AnalysisData selectedAnalysisData)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
_selectedAnalysisData = selectedAnalysisData;
|
||||
|
||||
// 초기 설정
|
||||
InitForm();
|
||||
}
|
||||
@@ -52,12 +56,12 @@ namespace Million.SubForm
|
||||
// 기간 설정 (Default) : 현재 시간
|
||||
dateEdit_DateTime.DateTime = DateTime.Now;
|
||||
|
||||
comboBoxEdit_MarketInfo.Properties.Items.AddRange(CommonProperty.selectedMarketOfPlaceList.Select(t => t.KorName).ToList());
|
||||
//comboBoxEdit_MarketInfo.Properties.Items.AddRange(CommonProperty.selectedMarketOfPlaceList.Select(t => t.KorName).ToList());
|
||||
|
||||
//// DB 서버 정보 생성
|
||||
//var strConn = Million.CommonProperty.DbConnectionStr + comboBoxEdit_ExchangePlace.EditValue;
|
||||
|
||||
chartViewerUi = new ChartViewerUI();
|
||||
chartViewerUi = new ChartViewerUI(_selectedAnalysisData);
|
||||
panel_ChartViewer.Controls.Add(chartViewerUi);
|
||||
}
|
||||
|
||||
|
||||
86
Million/SubForm/ChartViewerUI.Designer.cs
generated
86
Million/SubForm/ChartViewerUI.Designer.cs
generated
@@ -28,6 +28,7 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
DevExpress.XtraEditors.RangeControlRange rangeControlRange1 = new DevExpress.XtraEditors.RangeControlRange();
|
||||
DevExpress.XtraCharts.XYDiagram xyDiagram1 = new DevExpress.XtraCharts.XYDiagram();
|
||||
DevExpress.XtraCharts.Series series1 = new DevExpress.XtraCharts.Series();
|
||||
DevExpress.XtraCharts.SeriesPoint seriesPoint1 = new DevExpress.XtraCharts.SeriesPoint("21-03-19 00:00", new object[] {
|
||||
@@ -93,59 +94,59 @@
|
||||
DevExpress.XtraCharts.CandleStickSeriesView candleStickSeriesView1 = new DevExpress.XtraCharts.CandleStickSeriesView();
|
||||
DevExpress.XtraCharts.Series series2 = new DevExpress.XtraCharts.Series();
|
||||
DevExpress.XtraCharts.LineSeriesView lineSeriesView1 = new DevExpress.XtraCharts.LineSeriesView();
|
||||
DevExpress.XtraCharts.SideBySideBarSeriesView sideBySideBarSeriesView1 = new DevExpress.XtraCharts.SideBySideBarSeriesView();
|
||||
DevExpress.XtraCharts.XYDiagram xyDiagram2 = new DevExpress.XtraCharts.XYDiagram();
|
||||
DevExpress.XtraCharts.Series series3 = new DevExpress.XtraCharts.Series();
|
||||
this.rangeControl1 = new DevExpress.XtraEditors.RangeControl();
|
||||
this.chartControl_Candle = new DevExpress.XtraCharts.ChartControl();
|
||||
this.splitterControl1 = new DevExpress.XtraEditors.SplitterControl();
|
||||
this.splitContainerControl_CharViewer = new DevExpress.XtraEditors.SplitContainerControl();
|
||||
this.chartControl_Candle = new DevExpress.XtraCharts.ChartControl();
|
||||
this.chartControl_Bar = new DevExpress.XtraCharts.ChartControl();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainerControl_CharViewer)).BeginInit();
|
||||
this.splitContainerControl_CharViewer.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.rangeControl1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.chartControl_Candle)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(xyDiagram1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(series1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(candleStickSeriesView1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(series2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(lineSeriesView1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(sideBySideBarSeriesView1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainerControl_CharViewer)).BeginInit();
|
||||
this.splitContainerControl_CharViewer.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.chartControl_Bar)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(xyDiagram2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(series3)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitterControl1
|
||||
// rangeControl1
|
||||
//
|
||||
this.splitterControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitterControl1.Name = "splitterControl1";
|
||||
this.splitterControl1.Size = new System.Drawing.Size(5, 517);
|
||||
this.splitterControl1.TabIndex = 4;
|
||||
this.splitterControl1.TabStop = false;
|
||||
//
|
||||
// splitContainerControl_CharViewer
|
||||
//
|
||||
this.splitContainerControl_CharViewer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainerControl_CharViewer.Horizontal = false;
|
||||
this.splitContainerControl_CharViewer.InvertTouchScroll = true;
|
||||
this.splitContainerControl_CharViewer.Location = new System.Drawing.Point(5, 0);
|
||||
this.splitContainerControl_CharViewer.Name = "splitContainerControl_CharViewer";
|
||||
this.splitContainerControl_CharViewer.Panel1.Controls.Add(this.chartControl_Candle);
|
||||
this.splitContainerControl_CharViewer.Panel1.Text = "Panel1";
|
||||
this.splitContainerControl_CharViewer.Panel2.Controls.Add(this.chartControl_Bar);
|
||||
this.splitContainerControl_CharViewer.Panel2.Text = "Panel2";
|
||||
this.splitContainerControl_CharViewer.Size = new System.Drawing.Size(829, 517);
|
||||
this.splitContainerControl_CharViewer.SplitterPosition = 343;
|
||||
this.splitContainerControl_CharViewer.TabIndex = 5;
|
||||
this.rangeControl1.Client = this.chartControl_Candle;
|
||||
this.rangeControl1.Location = new System.Drawing.Point(11, 568);
|
||||
this.rangeControl1.Name = "rangeControl1";
|
||||
rangeControlRange1.Maximum = "9";
|
||||
rangeControlRange1.Minimum = "3";
|
||||
rangeControlRange1.Owner = this.rangeControl1;
|
||||
this.rangeControl1.SelectedRange = rangeControlRange1;
|
||||
this.rangeControl1.SelectionType = DevExpress.XtraEditors.RangeControlSelectionType.ThumbAndFlag;
|
||||
this.rangeControl1.Size = new System.Drawing.Size(420, 105);
|
||||
this.rangeControl1.TabIndex = 6;
|
||||
this.rangeControl1.Text = "rangeControl1";
|
||||
//
|
||||
// chartControl_Candle
|
||||
//
|
||||
this.chartControl_Candle.CrosshairOptions.ShowOutOfRangePoints = true;
|
||||
xyDiagram1.AxisX.AutoScaleBreaks.Enabled = true;
|
||||
xyDiagram1.AxisX.AutoScaleBreaks.MaxCount = 6;
|
||||
xyDiagram1.AxisX.GridLines.MinorVisible = true;
|
||||
xyDiagram1.AxisX.GridLines.Visible = true;
|
||||
xyDiagram1.AxisX.Interlaced = true;
|
||||
xyDiagram1.AxisX.Label.TextPattern = "{yy-MM-dd h:mm}";
|
||||
xyDiagram1.AxisX.VisibleInPanesSerializable = "";
|
||||
xyDiagram1.AxisX.VisualRange.Auto = false;
|
||||
xyDiagram1.AxisX.VisualRange.MaxValueSerializable = "9";
|
||||
xyDiagram1.AxisX.VisualRange.MinValueSerializable = "3";
|
||||
xyDiagram1.AxisY.VisibleInPanesSerializable = "";
|
||||
xyDiagram1.AxisY.WholeRange.AlwaysShowZeroLevel = false;
|
||||
this.chartControl_Candle.Diagram = xyDiagram1;
|
||||
this.chartControl_Candle.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.chartControl_Candle.FillStyle.FillMode = DevExpress.XtraCharts.FillMode.Empty;
|
||||
this.chartControl_Candle.Legend.Name = "Default Legend";
|
||||
this.chartControl_Candle.Location = new System.Drawing.Point(0, 0);
|
||||
@@ -170,9 +171,33 @@
|
||||
this.chartControl_Candle.SeriesSerializable = new DevExpress.XtraCharts.Series[] {
|
||||
series1,
|
||||
series2};
|
||||
sideBySideBarSeriesView1.RangeControlOptions.ViewType = DevExpress.XtraCharts.RangeControlViewType.Area;
|
||||
this.chartControl_Candle.SeriesTemplate.View = sideBySideBarSeriesView1;
|
||||
this.chartControl_Candle.Size = new System.Drawing.Size(829, 343);
|
||||
this.chartControl_Candle.TabIndex = 3;
|
||||
//
|
||||
// splitterControl1
|
||||
//
|
||||
this.splitterControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitterControl1.Name = "splitterControl1";
|
||||
this.splitterControl1.Size = new System.Drawing.Size(5, 807);
|
||||
this.splitterControl1.TabIndex = 4;
|
||||
this.splitterControl1.TabStop = false;
|
||||
//
|
||||
// splitContainerControl_CharViewer
|
||||
//
|
||||
this.splitContainerControl_CharViewer.Horizontal = false;
|
||||
this.splitContainerControl_CharViewer.InvertTouchScroll = true;
|
||||
this.splitContainerControl_CharViewer.Location = new System.Drawing.Point(5, 0);
|
||||
this.splitContainerControl_CharViewer.Name = "splitContainerControl_CharViewer";
|
||||
this.splitContainerControl_CharViewer.Panel1.Controls.Add(this.chartControl_Candle);
|
||||
this.splitContainerControl_CharViewer.Panel1.Text = "Panel1";
|
||||
this.splitContainerControl_CharViewer.Panel2.Controls.Add(this.chartControl_Bar);
|
||||
this.splitContainerControl_CharViewer.Panel2.Text = "Panel2";
|
||||
this.splitContainerControl_CharViewer.Size = new System.Drawing.Size(829, 517);
|
||||
this.splitContainerControl_CharViewer.SplitterPosition = 343;
|
||||
this.splitContainerControl_CharViewer.TabIndex = 5;
|
||||
//
|
||||
// chartControl_Bar
|
||||
//
|
||||
xyDiagram2.AxisX.GridLines.MinorVisible = true;
|
||||
@@ -183,7 +208,6 @@
|
||||
xyDiagram2.AxisY.VisibleInPanesSerializable = "";
|
||||
xyDiagram2.AxisY.WholeRange.AlwaysShowZeroLevel = false;
|
||||
this.chartControl_Bar.Diagram = xyDiagram2;
|
||||
this.chartControl_Bar.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.chartControl_Bar.FillStyle.FillMode = DevExpress.XtraCharts.FillMode.Empty;
|
||||
this.chartControl_Bar.Legend.Name = "Default Legend";
|
||||
this.chartControl_Bar.Location = new System.Drawing.Point(0, 0);
|
||||
@@ -198,18 +222,21 @@
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.rangeControl1);
|
||||
this.Controls.Add(this.splitContainerControl_CharViewer);
|
||||
this.Controls.Add(this.splitterControl1);
|
||||
this.Name = "ChartViewerUI";
|
||||
this.Size = new System.Drawing.Size(834, 517);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainerControl_CharViewer)).EndInit();
|
||||
this.splitContainerControl_CharViewer.ResumeLayout(false);
|
||||
this.Size = new System.Drawing.Size(997, 807);
|
||||
((System.ComponentModel.ISupportInitialize)(this.rangeControl1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(xyDiagram1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(candleStickSeriesView1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(series1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(lineSeriesView1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(series2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(sideBySideBarSeriesView1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.chartControl_Candle)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainerControl_CharViewer)).EndInit();
|
||||
this.splitContainerControl_CharViewer.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(xyDiagram2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(series3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.chartControl_Bar)).EndInit();
|
||||
@@ -223,5 +250,6 @@
|
||||
private DevExpress.XtraEditors.SplitContainerControl splitContainerControl_CharViewer;
|
||||
public DevExpress.XtraCharts.ChartControl chartControl_Candle;
|
||||
public DevExpress.XtraCharts.ChartControl chartControl_Bar;
|
||||
private DevExpress.XtraEditors.RangeControl rangeControl1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,12 +21,14 @@ namespace Million.SubForm
|
||||
{
|
||||
List<CandleData> datas = null;
|
||||
List<IndicatorCoditionSetup> setupList = null;
|
||||
public ChartViewerUI()
|
||||
|
||||
AnalysisData _analysisData = null;
|
||||
|
||||
public ChartViewerUI(AnalysisData analysisData)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
|
||||
|
||||
_analysisData = analysisData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -40,6 +42,10 @@ namespace Million.SubForm
|
||||
ResetDraw();
|
||||
DrawChart();
|
||||
SetDiagram();
|
||||
|
||||
rangeControl1.SelectedRange.Maximum = "9";
|
||||
rangeControl1.SelectedRange.Minimum = "1";
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -67,8 +73,18 @@ namespace Million.SubForm
|
||||
Series candle = new Series();
|
||||
candle.View = new CandleStickSeriesView();
|
||||
chartControl_Candle.Series.Add(candle);
|
||||
candle.ArgumentScaleType = ScaleType.DateTime;
|
||||
|
||||
// Access the chart's diagram.
|
||||
XYDiagram diagram = (XYDiagram)chartControl_Candle.Diagram;
|
||||
|
||||
// Exclude empty ranges from the X-axis range
|
||||
// to avoid gaps in the chart's data.
|
||||
|
||||
|
||||
// Hide the range without points at the beginning of the y-axis.
|
||||
diagram.AxisY.WholeRange.AlwaysShowZeroLevel = false;
|
||||
|
||||
foreach (var item in datas)
|
||||
{
|
||||
candle.Points.Add(new SeriesPoint(item.DateTime, new double[] { item.LowValue, item.HighValue, item.StartValue, item.EndValue }));
|
||||
@@ -80,6 +96,7 @@ namespace Million.SubForm
|
||||
/// <param name="setup"></param>
|
||||
public void DrawChart(IndicatorCoditionSetup setup)
|
||||
{
|
||||
|
||||
var line = new Series();
|
||||
line.View = new LineSeriesView();
|
||||
chartControl_Candle.Series.Add(line);
|
||||
|
||||
Reference in New Issue
Block a user