데이터 조회 Enum 변경(우선 분으로 처리)

This commit is contained in:
DESKTOP-YHKIM\yhkim
2021-11-17 12:05:05 +09:00
parent 76e5b65478
commit d67b63b6f6
5 changed files with 50 additions and 20 deletions

View File

@@ -42,6 +42,8 @@
this.comboBoxEdit_MarketInfo = new DevExpress.XtraEditors.ComboBoxEdit();
this.button_AllMarketDataAcc = new System.Windows.Forms.Button();
this.button_SelectedMarketDataAcc = new System.Windows.Forms.Button();
this.checkedListBox1 = new System.Windows.Forms.CheckedListBox();
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit();
this.panelControl1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.listBoxControl_logViewer)).BeginInit();
@@ -60,7 +62,7 @@
this.panelControl1.Dock = System.Windows.Forms.DockStyle.Right;
this.panelControl1.Location = new System.Drawing.Point(246, 0);
this.panelControl1.Name = "panelControl1";
this.panelControl1.Size = new System.Drawing.Size(227, 251);
this.panelControl1.Size = new System.Drawing.Size(227, 458);
this.panelControl1.TabIndex = 0;
//
// listBoxControl_logViewer
@@ -68,7 +70,7 @@
this.listBoxControl_logViewer.Dock = System.Windows.Forms.DockStyle.Fill;
this.listBoxControl_logViewer.Location = new System.Drawing.Point(2, 2);
this.listBoxControl_logViewer.Name = "listBoxControl_logViewer";
this.listBoxControl_logViewer.Size = new System.Drawing.Size(223, 247);
this.listBoxControl_logViewer.Size = new System.Drawing.Size(223, 454);
this.listBoxControl_logViewer.TabIndex = 0;
//
// panelControl2
@@ -78,7 +80,7 @@
this.panelControl2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelControl2.Location = new System.Drawing.Point(0, 0);
this.panelControl2.Name = "panelControl2";
this.panelControl2.Size = new System.Drawing.Size(246, 251);
this.panelControl2.Size = new System.Drawing.Size(246, 458);
this.panelControl2.TabIndex = 1;
//
// groupBox_DB접속
@@ -113,6 +115,8 @@
//
// groupBox_데이터누적
//
this.groupBox_데이터누적.Controls.Add(this.label1);
this.groupBox_데이터누적.Controls.Add(this.checkedListBox1);
this.groupBox_데이터누적.Controls.Add(this.label_종목타입);
this.groupBox_데이터누적.Controls.Add(this.label_종목이름);
this.groupBox_데이터누적.Controls.Add(this.label_종목코드);
@@ -122,7 +126,7 @@
this.groupBox_데이터누적.Controls.Add(this.button_SelectedMarketDataAcc);
this.groupBox_데이터누적.Location = new System.Drawing.Point(13, 62);
this.groupBox_데이터누적.Name = "groupBox_데이터누적";
this.groupBox_데이터누적.Size = new System.Drawing.Size(215, 181);
this.groupBox_데이터누적.Size = new System.Drawing.Size(215, 364);
this.groupBox_데이터누적.TabIndex = 0;
this.groupBox_데이터누적.TabStop = false;
this.groupBox_데이터누적.Text = "데이터 누적";
@@ -148,7 +152,7 @@
// label_종목코드
//
this.label_종목코드.AutoSize = true;
this.label_종목코드.Location = new System.Drawing.Point(130, 120);
this.label_종목코드.Location = new System.Drawing.Point(145, 281);
this.label_종목코드.Name = "label_종목코드";
this.label_종목코드.Size = new System.Drawing.Size(51, 14);
this.label_종목코드.TabIndex = 4;
@@ -170,7 +174,7 @@
this.comboBoxEdit_MarketInfo.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.comboBoxEdit_MarketInfo.Size = new System.Drawing.Size(113, 20);
this.comboBoxEdit_MarketInfo.TabIndex = 3;
this.comboBoxEdit_MarketInfo.TabIndex = 3;
//
// button_AllMarketDataAcc
//
@@ -185,7 +189,7 @@
//
// button_SelectedMarketDataAcc
//
this.button_SelectedMarketDataAcc.Location = new System.Drawing.Point(13, 141);
this.button_SelectedMarketDataAcc.Location = new System.Drawing.Point(13, 319);
this.button_SelectedMarketDataAcc.Name = "button_SelectedMarketDataAcc";
this.button_SelectedMarketDataAcc.Size = new System.Drawing.Size(183, 23);
this.button_SelectedMarketDataAcc.TabIndex = 0;
@@ -193,11 +197,35 @@
this.button_SelectedMarketDataAcc.UseVisualStyleBackColor = true;
this.button_SelectedMarketDataAcc.Click += new System.EventHandler(this.button_SelectedMarketDataAcc_Click);
//
// checkedListBox1
//
this.checkedListBox1.FormattingEnabled = true;
this.checkedListBox1.Items.AddRange(new object[] {
"1m",
"3m",
"5m",
"1h",
"4h",
"1d"});
this.checkedListBox1.Location = new System.Drawing.Point(83, 141);
this.checkedListBox1.Name = "checkedListBox1";
this.checkedListBox1.Size = new System.Drawing.Size(113, 106);
this.checkedListBox1.TabIndex = 5;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(14, 141);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(63, 14);
this.label1.TabIndex = 6;
this.label1.Text = "시간 종류 : ";
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(473, 251);
this.ClientSize = new System.Drawing.Size(473, 458);
this.Controls.Add(this.panelControl2);
this.Controls.Add(this.panelControl1);
this.Name = "MainForm";
@@ -234,6 +262,8 @@
private System.Windows.Forms.Label label_종목타입;
private DevExpress.XtraEditors.ComboBoxEdit comboBoxEdit_PaymentType;
private System.Windows.Forms.Label label_종목이름;
private System.Windows.Forms.CheckedListBox checkedListBox1;
private System.Windows.Forms.Label label1;
}
}

View File

@@ -121,12 +121,12 @@ namespace DataSaver
if (placeName.Equals("Bithumb"))
type = CommonProperty.ExchangeWebReqType.BithumbCandleTicker;
foreach (var item in CommonProperty.ICandleTimeType)
foreach (var item in CommonProperty.IMCandleTimeType)
{
var recentlyDbDataList = Million.DbManagement.DbServiceFunctions.GetOldNewDataList_FromDB
(marketList, placeName, (CommonProperty.CandleTimeType)item);
(marketList, placeName, (CommonProperty.MCandleTimeType)item);
Million.DbManagement.DbServiceFunctions.SetCandleData(placeName, type, recentlyDbDataList, (CommonProperty.CandleTimeType)item);
Million.DbManagement.DbServiceFunctions.SetCandleData(placeName, type, recentlyDbDataList, (CommonProperty.MCandleTimeType)item);
}
}

View File

@@ -74,21 +74,20 @@ namespace Million
#endregion
}
// 캔들 데이터 (1분) (3분) (5분) (10분) (30분) (1시간) (6시간) (12시간) (24시간)
public enum CandleTimeType
// 캔들 데이터 (1분) (3분) (5분) (10분) (15분) (30분) (1시간) (4시간)
public enum MCandleTimeType
{
M1 = 1,
M3 = 3,
M5 = 5,
M10 = 10,
M15 = 15,
M30 = 30,
H1 = 60,
H6 = 360,
M12 = 720,
D1 = 1440
H4 = 240
}
// 캔들 데이터ㅁ
public static int[] ICandleTimeType = new int[] { 1, 3, 5, 10, 30, 60, 360, 720, 1440 };
public static int[] IMCandleTimeType = new int[] { 1, 3, 5, 10, 15, 30, 60, 240};

View File

@@ -80,7 +80,8 @@ namespace Million.DbManagement
/// <param name="marketNameList"></param>
/// <param name="databaseName"></param>
/// <returns></returns>
public static List<CandleDataList> GetOldNewDataList_FromDB(List<MarketData> marketNameList, string databaseName, CandleTimeType candleTimeType = CandleTimeType.M1)
public static List<CandleDataList> GetOldNewDataList_FromDB(List<MarketData> marketNameList, string databaseName, MCandleTimeType candleTimeType = MCandleTimeType.M1)
{
var returnData = new List<CandleDataList>();
var strDbCon = CommonProperty.DbConnectionStr + databaseName;
@@ -131,7 +132,7 @@ namespace Million.DbManagement
/// </summary>
/// <param name="place"></param>
/// <param name="recentlyDbDataList"></param>
public static void SetCandleData(string placeName, ExchangeWebReqType place, List<CandleDataList> recentlyDbDataList, CandleTimeType candleTimeType = CandleTimeType.M1)
public static void SetCandleData(string placeName, ExchangeWebReqType place, List<CandleDataList> recentlyDbDataList, MCandleTimeType candleTimeType = MCandleTimeType.M1)
{
var dateTime = DateTime.Now;

View File

@@ -34,7 +34,7 @@ namespace Million.WebMangement.Upbit
/// <param name="datetime"></param>
/// <param name="count"></param>
/// <returns></returns>
public List<CandleData> GetCandleStics(string codeFullName, CandleTimeType candleType, DateTime datetime, int count = 200)
public List<CandleData> GetCandleStics(string codeFullName, MCandleTimeType candleType, DateTime datetime, int count = 200)
{
var url = UpbitURL_CandleStick + (int)candleType;