검증기 완료

This commit is contained in:
Youngho Kim
2022-04-14 12:10:22 +09:00
parent 34cdf1b771
commit 8e8d49c235
3 changed files with 30 additions and 7 deletions

View File

@@ -33,6 +33,7 @@
this.listBox1 = new System.Windows.Forms.ListBox();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
@@ -85,11 +86,22 @@
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button4
//
this.button4.Location = new System.Drawing.Point(47, 299);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(75, 23);
this.button4.TabIndex = 5;
this.button4.Text = "검증기";
this.button4.UseVisualStyleBackColor = true;
this.button4.Click += new System.EventHandler(this.button4_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1415, 703);
this.Controls.Add(this.button4);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.listBox1);
@@ -109,6 +121,7 @@
private System.Windows.Forms.ListBox listBox1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
}
}

View File

@@ -170,5 +170,21 @@ namespace Million_Prototype
}
}
}
private void button4_Click(object sender, EventArgs e)
{
DbServiceFunctions.GetMarketTable_FromDB("Upbit");
var tableList = CommonProperty.selectedMarketOfPlaceList;
var selectTable = tableList.FirstOrDefault(t => t.CodeFullName == "KRW-BTC");
if (selectTable != null)
{
var startDate = new DateTime(2000, 1, 1);
var candleData = DbServiceFunctions.GetCandleData(selectTable, startDate,DateTime.Now, MCandleTimeType.M1);
var temp = new List<CandleDataList>();
temp.Add(candleData);
var returndata = ValidationCheckManager.ValidateCandleDataList(temp, MCandleTimeType.M1);
}
}
}
}

View File

@@ -125,7 +125,7 @@ namespace Million.DbManagement
else if (candleTimeType == MCandleTimeType.MT1)
startDate = startDate.AddMonths(-72);
var sqlQuery = string.Format(@"SELECT [DateTime],[StartValue],[EndValue],[HighValue],[LowValue],[MoneyVolume],[CandleTimeType] FROM [{0}] WHERE [DateTime] >= '{1}' AND [DateTime] <= '{2}' AND [CandleTimeType] = {3} ORDER BY [DateTime] ASC", marketData.CodeFullName, startDate.ToString("yyyy-MM-dd HH:mm:ss"), endDate.ToString("yyyy-MM-dd HH:mm:ss"), candleTimeType);
var sqlQuery = string.Format(@"SELECT [DateTime],[StartValue],[EndValue],[HighValue],[LowValue],[MoneyVolume],[CandleTimeType] FROM [{0}] WHERE [DateTime] >= '{1}' AND [DateTime] <= '{2}' AND [CandleTimeType] = {3} ORDER BY [DateTime] ASC", marketData.CodeFullName, startDate.ToString("yyyy-MM-dd HH:mm:ss"), endDate.ToString("yyyy-MM-dd HH:mm:ss"), (int)candleTimeType);
var dataList = DBConnection.QueryGetExcuter_Candle(strDbCon, sqlQuery);
@@ -179,12 +179,6 @@ namespace Million.DbManagement
returnData.ConGoodsData = marketData;
returnData.CandleDataLists_Im = dataList;
var temps = new List<CandleDataList>();
temps.Add(returnData);
//Test
var temp = ValidationCheckManager.ValidateCandleDataList(temps, candleTimeType);
return returnData;
}