테스,트 보드 수정

This commit is contained in:
jwlee
2023-05-22 11:53:10 +09:00
parent 365aad2cc4
commit eee350d247
4 changed files with 352 additions and 60 deletions

View File

@@ -52,6 +52,20 @@ namespace Million_Hunter.HunterSubForm
this.simpleButton_찬 = new DevExpress.XtraEditors.SimpleButton();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.checkEdit_1H = new DevExpress.XtraEditors.CheckEdit();
this.checkEdit_4H = new DevExpress.XtraEditors.CheckEdit();
this.checkEdit_8H = new DevExpress.XtraEditors.CheckEdit();
this.checkEdit_12H = new DevExpress.XtraEditors.CheckEdit();
this.checkEdit_1D = new DevExpress.XtraEditors.CheckEdit();
this.checkEdit_15M = new DevExpress.XtraEditors.CheckEdit();
this.checkEdit_10M = new DevExpress.XtraEditors.CheckEdit();
this.checkEdit_5M = new DevExpress.XtraEditors.CheckEdit();
this.checkEdit_1M = new DevExpress.XtraEditors.CheckEdit();
this.comboBoxEdit_defaultTime = new DevExpress.XtraEditors.ComboBoxEdit();
this.checkEdit_구름떼돌파몇봉이내 = new DevExpress.XtraEditors.CheckEdit();
this.textEdit_구름떼돌파몇봉이내 = new DevExpress.XtraEditors.TextEdit();
this.checkEdit_시가볼린저40_1아래 = new DevExpress.XtraEditors.CheckEdit();
this.checkEdit_시가구름떼위 = new DevExpress.XtraEditors.CheckEdit();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.checkEdit_4시간_8시간구름떼위_양봉.Properties)).BeginInit();
@@ -71,6 +85,20 @@ namespace Million_Hunter.HunterSubForm
this.groupBox3.SuspendLayout();
this.groupBox4.SuspendLayout();
this.groupBox5.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.checkEdit_1H.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkEdit_4H.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkEdit_8H.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkEdit_12H.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkEdit_1D.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkEdit_15M.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkEdit_10M.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkEdit_5M.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkEdit_1M.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.comboBoxEdit_defaultTime.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkEdit_구름떼돌파몇봉이내.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.textEdit_구름떼돌파몇봉이내.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkEdit_시가볼린저40_1아래.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.checkEdit_시가구름떼위.Properties)).BeginInit();
this.SuspendLayout();
//
// simpleButton_FullInsertCandle
@@ -81,21 +109,35 @@ namespace Million_Hunter.HunterSubForm
this.simpleButton_FullInsertCandle.Name = "simpleButton_FullInsertCandle";
this.simpleButton_FullInsertCandle.Size = new System.Drawing.Size(121, 32);
this.simpleButton_FullInsertCandle.TabIndex = 1;
this.simpleButton_FullInsertCandle.Text = "1시간봉 다 채우기";
this.simpleButton_FullInsertCandle.Text = "시간봉 다 채우기";
this.simpleButton_FullInsertCandle.Click += new System.EventHandler(this.simpleButton_FullInsertCandle_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.comboBoxEdit_defaultTime);
this.groupBox1.Controls.Add(this.checkEdit_15M);
this.groupBox1.Controls.Add(this.checkEdit_10M);
this.groupBox1.Controls.Add(this.checkEdit_5M);
this.groupBox1.Controls.Add(this.checkEdit_1M);
this.groupBox1.Controls.Add(this.simpleButton_FullInsertCandle);
this.groupBox1.Controls.Add(this.checkEdit_1D);
this.groupBox1.Controls.Add(this.checkEdit_12H);
this.groupBox1.Controls.Add(this.checkEdit_8H);
this.groupBox1.Controls.Add(this.checkEdit_4H);
this.groupBox1.Controls.Add(this.checkEdit_1H);
this.groupBox1.Location = new System.Drawing.Point(12, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(340, 63);
this.groupBox1.Size = new System.Drawing.Size(255, 126);
this.groupBox1.TabIndex = 2;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "데이터 채우기";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.checkEdit_시가구름떼위);
this.groupBox2.Controls.Add(this.checkEdit_시가볼린저40_1아래);
this.groupBox2.Controls.Add(this.textEdit_구름떼돌파몇봉이내);
this.groupBox2.Controls.Add(this.checkEdit_구름떼돌파몇봉이내);
this.groupBox2.Controls.Add(this.groupBox5);
this.groupBox2.Controls.Add(this.groupBox4);
this.groupBox2.Controls.Add(this.checkEdit_시가가볼린저401보다작음);
@@ -108,7 +150,7 @@ namespace Million_Hunter.HunterSubForm
this.groupBox2.Controls.Add(this.checkEdit_구름떼상한선하락시판매);
this.groupBox2.Controls.Add(this.checkEdit_구매이전봉볼린저40_1이하);
this.groupBox2.Controls.Add(this.checkEdit_이전봉40_2볼린저이하);
this.groupBox2.Location = new System.Drawing.Point(12, 110);
this.groupBox2.Location = new System.Drawing.Point(12, 162);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(1006, 230);
this.groupBox2.TabIndex = 3;
@@ -261,10 +303,10 @@ namespace Million_Hunter.HunterSubForm
//
// progressBar1
//
this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.progressBar1.Location = new System.Drawing.Point(2, 474);
this.progressBar1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.progressBar1.Location = new System.Drawing.Point(0, 395);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(1029, 23);
this.progressBar1.Size = new System.Drawing.Size(1030, 23);
this.progressBar1.TabIndex = 5;
//
// simpleButton_찬
@@ -298,11 +340,135 @@ namespace Million_Hunter.HunterSubForm
this.groupBox5.TabStop = false;
this.groupBox5.Text = "데이터 변경 (봉 채우기 재필요)";
//
// checkEdit_1H
//
this.checkEdit_1H.Location = new System.Drawing.Point(6, 76);
this.checkEdit_1H.Name = "checkEdit_1H";
this.checkEdit_1H.Properties.Caption = "1H";
this.checkEdit_1H.Size = new System.Drawing.Size(43, 19);
this.checkEdit_1H.TabIndex = 9;
this.checkEdit_1H.CheckedChanged += new System.EventHandler(this.checkEdit_common_CheckedChanged);
//
// checkEdit_4H
//
this.checkEdit_4H.Location = new System.Drawing.Point(55, 76);
this.checkEdit_4H.Name = "checkEdit_4H";
this.checkEdit_4H.Properties.Caption = "4H";
this.checkEdit_4H.Size = new System.Drawing.Size(43, 19);
this.checkEdit_4H.TabIndex = 9;
this.checkEdit_4H.CheckedChanged += new System.EventHandler(this.checkEdit_common_CheckedChanged);
//
// checkEdit_8H
//
this.checkEdit_8H.Location = new System.Drawing.Point(104, 76);
this.checkEdit_8H.Name = "checkEdit_8H";
this.checkEdit_8H.Properties.Caption = "8H";
this.checkEdit_8H.Size = new System.Drawing.Size(43, 19);
this.checkEdit_8H.TabIndex = 9;
this.checkEdit_8H.CheckedChanged += new System.EventHandler(this.checkEdit_common_CheckedChanged);
//
// checkEdit_12H
//
this.checkEdit_12H.Location = new System.Drawing.Point(155, 76);
this.checkEdit_12H.Name = "checkEdit_12H";
this.checkEdit_12H.Properties.Caption = "12H";
this.checkEdit_12H.Size = new System.Drawing.Size(43, 19);
this.checkEdit_12H.TabIndex = 9;
this.checkEdit_12H.CheckedChanged += new System.EventHandler(this.checkEdit_common_CheckedChanged);
//
// checkEdit_1D
//
this.checkEdit_1D.Location = new System.Drawing.Point(6, 99);
this.checkEdit_1D.Name = "checkEdit_1D";
this.checkEdit_1D.Properties.Caption = "1D";
this.checkEdit_1D.Size = new System.Drawing.Size(43, 19);
this.checkEdit_1D.TabIndex = 9;
this.checkEdit_1D.CheckedChanged += new System.EventHandler(this.checkEdit_common_CheckedChanged);
//
// checkEdit_15M
//
this.checkEdit_15M.Location = new System.Drawing.Point(155, 54);
this.checkEdit_15M.Name = "checkEdit_15M";
this.checkEdit_15M.Properties.Caption = "15M";
this.checkEdit_15M.Size = new System.Drawing.Size(43, 19);
this.checkEdit_15M.TabIndex = 11;
//
// checkEdit_10M
//
this.checkEdit_10M.Location = new System.Drawing.Point(104, 54);
this.checkEdit_10M.Name = "checkEdit_10M";
this.checkEdit_10M.Properties.Caption = "10M";
this.checkEdit_10M.Size = new System.Drawing.Size(43, 19);
this.checkEdit_10M.TabIndex = 12;
//
// checkEdit_5M
//
this.checkEdit_5M.Location = new System.Drawing.Point(55, 54);
this.checkEdit_5M.Name = "checkEdit_5M";
this.checkEdit_5M.Properties.Caption = "5M";
this.checkEdit_5M.Size = new System.Drawing.Size(43, 19);
this.checkEdit_5M.TabIndex = 13;
//
// checkEdit_1M
//
this.checkEdit_1M.Location = new System.Drawing.Point(6, 54);
this.checkEdit_1M.Name = "checkEdit_1M";
this.checkEdit_1M.Properties.Caption = "1M";
this.checkEdit_1M.Size = new System.Drawing.Size(43, 19);
this.checkEdit_1M.TabIndex = 14;
//
// comboBoxEdit_defaultTime
//
this.comboBoxEdit_defaultTime.Location = new System.Drawing.Point(133, 28);
this.comboBoxEdit_defaultTime.Name = "comboBoxEdit_defaultTime";
this.comboBoxEdit_defaultTime.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.comboBoxEdit_defaultTime.Size = new System.Drawing.Size(100, 20);
this.comboBoxEdit_defaultTime.TabIndex = 15;
this.comboBoxEdit_defaultTime.SelectedIndexChanged += new System.EventHandler(this.comboBoxEdit_defaultTime_SelectedIndexChanged);
//
// checkEdit_구름떼돌파몇봉이내
//
this.checkEdit_구름떼돌파몇봉이내.Location = new System.Drawing.Point(385, 138);
this.checkEdit_구름떼돌파몇봉이내.Name = "checkEdit_구름떼돌파몇봉이내";
this.checkEdit_구름떼돌파몇봉이내.Properties.Caption = "구름떼 돌파 후 몇봉 이내";
this.checkEdit_구름떼돌파몇봉이내.Size = new System.Drawing.Size(141, 19);
this.checkEdit_구름떼돌파몇봉이내.TabIndex = 12;
this.checkEdit_구름떼돌파몇봉이내.CheckedChanged += new System.EventHandler(this.checkEdit_common_CheckedChanged);
//
// textEdit_구름떼돌파몇봉이내
//
this.textEdit_구름떼돌파몇봉이내.EditValue = "0";
this.textEdit_구름떼돌파몇봉이내.Location = new System.Drawing.Point(532, 137);
this.textEdit_구름떼돌파몇봉이내.Name = "textEdit_구름떼돌파몇봉이내";
this.textEdit_구름떼돌파몇봉이내.Properties.Mask.EditMask = "d";
this.textEdit_구름떼돌파몇봉이내.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
this.textEdit_구름떼돌파몇봉이내.Size = new System.Drawing.Size(42, 20);
this.textEdit_구름떼돌파몇봉이내.TabIndex = 13;
//
// checkEdit_시가볼린저40_1아래
//
this.checkEdit_시가볼린저40_1아래.Location = new System.Drawing.Point(385, 163);
this.checkEdit_시가볼린저40_1아래.Name = "checkEdit_시가볼린저40_1아래";
this.checkEdit_시가볼린저40_1아래.Properties.Caption = "시가 볼린저40 1 아래";
this.checkEdit_시가볼린저40_1아래.Size = new System.Drawing.Size(141, 19);
this.checkEdit_시가볼린저40_1아래.TabIndex = 14;
this.checkEdit_시가볼린저40_1아래.CheckedChanged += new System.EventHandler(this.checkEdit_common_CheckedChanged);
//
// checkEdit_시가구름떼위
//
this.checkEdit_시가구름떼위.Location = new System.Drawing.Point(385, 188);
this.checkEdit_시가구름떼위.Name = "checkEdit_시가구름떼위";
this.checkEdit_시가구름떼위.Properties.Caption = "시가 구름 떼 위";
this.checkEdit_시가구름떼위.Size = new System.Drawing.Size(141, 19);
this.checkEdit_시가구름떼위.TabIndex = 14;
this.checkEdit_시가구름떼위.CheckedChanged += new System.EventHandler(this.checkEdit_common_CheckedChanged);
//
// TestBoardForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1030, 497);
this.ClientSize = new System.Drawing.Size(1030, 418);
this.Controls.Add(this.progressBar1);
this.Controls.Add(this.simpleButton_찬);
this.Controls.Add(this.groupBox3);
@@ -329,6 +495,20 @@ namespace Million_Hunter.HunterSubForm
this.groupBox3.ResumeLayout(false);
this.groupBox4.ResumeLayout(false);
this.groupBox5.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.checkEdit_1H.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkEdit_4H.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkEdit_8H.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkEdit_12H.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkEdit_1D.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkEdit_15M.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkEdit_10M.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkEdit_5M.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkEdit_1M.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.comboBoxEdit_defaultTime.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkEdit_구름떼돌파몇봉이내.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.textEdit_구름떼돌파몇봉이내.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkEdit_시가볼린저40_1아래.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.checkEdit_시가구름떼위.Properties)).EndInit();
this.ResumeLayout(false);
}
@@ -359,5 +539,19 @@ namespace Million_Hunter.HunterSubForm
private DevExpress.XtraEditors.CheckEdit checkEdit_4시간_8시간구름떼위;
private System.Windows.Forms.GroupBox groupBox5;
private System.Windows.Forms.GroupBox groupBox4;
private DevExpress.XtraEditors.CheckEdit checkEdit_15M;
private DevExpress.XtraEditors.CheckEdit checkEdit_10M;
private DevExpress.XtraEditors.CheckEdit checkEdit_5M;
private DevExpress.XtraEditors.CheckEdit checkEdit_1M;
private DevExpress.XtraEditors.CheckEdit checkEdit_1D;
private DevExpress.XtraEditors.CheckEdit checkEdit_12H;
private DevExpress.XtraEditors.CheckEdit checkEdit_8H;
private DevExpress.XtraEditors.CheckEdit checkEdit_4H;
private DevExpress.XtraEditors.CheckEdit checkEdit_1H;
private DevExpress.XtraEditors.ComboBoxEdit comboBoxEdit_defaultTime;
private DevExpress.XtraEditors.CheckEdit checkEdit_구름떼돌파몇봉이내;
private DevExpress.XtraEditors.TextEdit textEdit_구름떼돌파몇봉이내;
private DevExpress.XtraEditors.CheckEdit checkEdit_시가구름떼위;
private DevExpress.XtraEditors.CheckEdit checkEdit_시가볼린저40_1아래;
}
}

View File

@@ -34,6 +34,10 @@ namespace Million_Hunter.HunterSubForm
parentForm = resultViewerForm;
analysisDatas = parentForm._analysisDatas;
// 시간 단위 가져오기
var candleTimeTypeList = Enum.GetNames(enumType: typeof(CommonProperty.MCandleTimeType));
comboBoxEdit_defaultTime.Properties.Items.AddRange(candleTimeTypeList);
comboBoxEdit_defaultTime.SelectedText = "H1";
}
@@ -80,10 +84,15 @@ namespace Million_Hunter.HunterSubForm
});
#endregion
MCandleTimeType = candleTypes.First();
/*
Enum.TryParse(comboBoxEdit_defaultTime.SelectedItem.ToString(),
out CommonProperty.MCandleTimeType mCandleTimeType);
*/
MCandleTimeType = CommonProperty.MCandleTimeType.H1;
//차트 Date Time 설정하기
var StartDateInterval = 60;
var StartDateInterval = 60 * 30;
var EndDateInterval = 100;
foreach(var analysisData in parentForm._analysisDatas)
@@ -116,10 +125,10 @@ namespace Million_Hunter.HunterSubForm
chartEndDate = startDate + new TimeSpan(0, 0, EndDateInterval, 0);
break;
case CommonProperty.MCandleTimeType.M10:
case CommonProperty.MCandleTimeType.M15:
case CommonProperty.MCandleTimeType.M5:
case CommonProperty.MCandleTimeType.M3:
case CommonProperty.MCandleTimeType.M30:
case CommonProperty.MCandleTimeType.M5:
case CommonProperty.MCandleTimeType.M15:
break;
case CommonProperty.MCandleTimeType.D1:
chartStartDate = startDate - new TimeSpan(StartDateInterval, 0, 0, 0);
@@ -133,10 +142,14 @@ namespace Million_Hunter.HunterSubForm
, _chartIndicatorCoditionSetups, true, candleTypes);
var dic_4 = DataManager.GetConvertCandleDataList(dic[CommonProperty.MCandleTimeType.H1], CommonProperty.MCandleTimeType.H4);
var dic_8 = DataManager.GetConvertCandleDataList(dic[CommonProperty.MCandleTimeType.H1], CommonProperty.MCandleTimeType.H8);
//var dic_8 = DataManager.GetConvertCandleDataList(dic[CommonProperty.MCandleTimeType.H1], CommonProperty.MCandleTimeType.H8);
//var dic_12 = DataManager.GetConvertCandleDataList(dic[CommonProperty.MCandleTimeType.H1], CommonProperty.MCandleTimeType.H12);
//var dic_1d = DataManager.GetConvertCandleDataList(dic[CommonProperty.MCandleTimeType.H1], CommonProperty.MCandleTimeType.D1);
dic.Add(CommonProperty.MCandleTimeType.H4, dic_4);
dic.Add(CommonProperty.MCandleTimeType.H8, dic_8);
//dic.Add(CommonProperty.MCandleTimeType.H4, dic_4);
//dic.Add(CommonProperty.MCandleTimeType.H8, dic_8);
//dic.Add(CommonProperty.MCandleTimeType.H12, dic_12);
//dic.Add(CommonProperty.MCandleTimeType.D1, dic_1d);
if (analysisData.CandleDatas != null)
{
@@ -185,7 +198,6 @@ namespace Million_Hunter.HunterSubForm
public void calcurateFilter()
{
// 필터 초기화
resetFilter();
@@ -284,6 +296,10 @@ namespace Million_Hunter.HunterSubForm
analysisData.Inclusion = false;
}
}
else
{
}
}
}
@@ -302,60 +318,35 @@ namespace Million_Hunter.HunterSubForm
foreach (var analysisData in parentForm._analysisDatas)
{
if (!analysisData.Inclusion) continue;
var startDate = changeDatetimeFormat(analysisData.StartDate, 0);
var endDate = changeDatetimeFormat(analysisData.EndDate, 0);
var candleData = analysisData.CandleDatas.First().Value.Find(item => item.DateTime >= startDate &&
item.IndicatorDic["Ich2695226"]?.value != null && item.IndicatorDic["Ich2695226"]?.value > item.LowValue);
var candleData = analysisData.CandleDatas.First().Value.Find(item => item.DateTime > startDate && item.DateTime < endDate &&
item.IndicatorDic["Ich2695226"]?.value != null && ((IchimokData)item.IndicatorDic["Ich2695226"]).GetOverValue() > item.LowValue);
if(candleData != null)
if (candleData != null)
{
var endResut = changeDatetimeFormat(candleData.DateTime, 0);
var ichValue = ((IchimokData)candleData.IndicatorDic["Ich2695226"]).GetOverValue();
// 판매 시간 이전에 하락 시 다시 계산
if (endDate > endResut)
if (ichValue > analysisData.BuyValue)
{
// 수익이면
if (analysisData.BuyValue > ichValue)
{
winRate++;
count__++;
}
//var profitRate1 = profitRate1 + (-100 + (Convert.ToDouble(ichValue) / Convert.ToDouble(analysisData.BuyValue) * 100));
profitRate += -1 * ((analysisData.BuyValue - ichValue) / analysisData.BuyValue * 100);
analysisData.WinFlag = true;
}
else
{
if (analysisData.WinFlag)
{
winRate++;
count_2++;
}
profitRate = profitRate + analysisData.EarningRate;
analysisData.WinFlag = false;
}
}
else
{
if(startDate != endDate)
analysisData.EarningRate = analysisData.EarningRate = (-100 + (ichValue / analysisData.BuyValue) * 100);
if (analysisData.EarningRate < -4)
{
}
if (analysisData.WinFlag)
{
count_2++;
winRate++;
}
else { }
profitRate = profitRate + analysisData.EarningRate;
}
}
@@ -597,15 +588,117 @@ namespace Million_Hunter.HunterSubForm
dateT8 = changeDatetimeFormat(dateT8, -8);
}
}
var data12 = analysisData.CandleDatas[CommonProperty.MCandleTimeType.H12].Find(item => changeDatetimeFormat(startDate, -12) <= item.DateTime && item.DateTime <= startDate);
if (data12 == null)
{
var dateT12 = new DateTime();
dateT12 = startDate;
while (data12 == null)
{
data12 = analysisData.CandleDatas[CommonProperty.MCandleTimeType.H12].Find(item => changeDatetimeFormat(dateT12, -12) <= item.DateTime && item.DateTime <= dateT12);
dateT12 = changeDatetimeFormat(dateT12, -12);
}
}
var data24 = analysisData.CandleDatas[CommonProperty.MCandleTimeType.D1].Find(item => changeDatetimeFormat(startDate, -24) <= item.DateTime && item.DateTime <= startDate);
if (data24 == null)
{
var dateT24 = new DateTime();
dateT24 = startDate;
while (data24 == null)
{
data24 = analysisData.CandleDatas[CommonProperty.MCandleTimeType.D1].Find(item => changeDatetimeFormat(dateT24, -24) <= item.DateTime && item.DateTime <= dateT24);
dateT24 = changeDatetimeFormat(dateT24, -24);
}
}
var maxich = Math.Max(((IchimokData)data.IndicatorDic["Ich2695226"]).value, ((IchimokData)data.IndicatorDic["Ich2695226"]).value2);
var maxich4 = Math.Max(((IchimokData)data4.IndicatorDic["Ich2695226"]).value, ((IchimokData)data4.IndicatorDic["Ich2695226"]).value2);
var maxich8 = Math.Max(((IchimokData)data8.IndicatorDic["Ich2695226"]).value, ((IchimokData)data8.IndicatorDic["Ich2695226"]).value2);
var maxich12 = Math.Max(((IchimokData)data12.IndicatorDic["Ich2695226"]).value, ((IchimokData)data12.IndicatorDic["Ich2695226"]).value2);
var maxichD1 = Math.Max(((IchimokData)data24.IndicatorDic["Ich2695226"]).value, ((IchimokData)data24.IndicatorDic["Ich2695226"]).value2);
if (analysisData.Inclusion)
if (maxich8 >= data8.StartValue || maxich4 >= data4.StartValue) analysisData.Inclusion = false;
{
if (!(maxichD1 < data24.StartValue && maxich12 < data12.StartValue && maxich8 < data8.StartValue && maxich4 < data4.StartValue
//&& data12.IndicatorDic["Bol401"].value < data12.StartValue
// && data8.IndicatorDic["Bol401"].value < data8.StartValue
// && data4.IndicatorDic["Bol401"].value < data4.StartValue
)) analysisData.Inclusion = false;
}
}
}
if(checkEdit_구름떼돌파몇봉이내.Checked)
{
var timeInterval = Convert.ToInt32(textEdit_구름떼돌파몇봉이내.Text);
foreach (var analysisData in parentForm._analysisDatas)
{
if (analysisData.Inclusion)
{
var 몇봉이내이전봉시간 = changeDatetimeFormat(analysisData.StartDate, -timeInterval -1);
var data = analysisData.CandleDatas.First().Value.Find(item => item.DateTime == 몇봉이내이전봉시간);
if (data == null)
{
analysisData.Description += "데이터 없음" + analysisData.Description;
continue;
}
var ichData = (IchimokData)data.IndicatorDic["Ich2695226"];
if (data.HighValue < Math.Max(ichData.value2, ichData.value2))
{
analysisData.Inclusion = true;
}
else analysisData.Inclusion = false;
}
}
}
if (checkEdit_시가볼린저40_1아래.Checked)
{
foreach (var analysisData in parentForm._analysisDatas)
{
var startDate = changeDatetimeFormat(analysisData.StartDate, 0);
var data = analysisData.CandleDatas.First().Value.Find(item => item.DateTime == startDate);
if (data == null)
{
analysisData.Description += "데이터 없음" + analysisData.Description;
continue;
}
if (analysisData.Inclusion)
{
if (data.StartValue < data.IndicatorDic["Bol401"].value) analysisData.Inclusion = true;
else analysisData.Inclusion = false;
}
}
}
if (checkEdit_시가구름떼위.Checked)
{
foreach (var analysisData in parentForm._analysisDatas)
{
var startDate = changeDatetimeFormat(analysisData.StartDate, 0);
var data = analysisData.CandleDatas.First().Value.Find(item => item.DateTime == startDate);
if (data == null)
{
analysisData.Description += "데이터 없음" + analysisData.Description;
continue;
}
if (analysisData.Inclusion)
{
var ichData = (IchimokData)data.IndicatorDic["Ich2695226"];
if (data.StartValue > Math.Max(ichData.value, ichData.value2)) analysisData.Inclusion = true;
else analysisData.Inclusion = false;
}
}
}
parentForm.CalcurateProfitAndWinRate();
parentForm.treeList_ResultData.RefreshDataSource();
}
@@ -632,10 +725,10 @@ namespace Million_Hunter.HunterSubForm
case CommonProperty.MCandleTimeType.M1:
break;
case CommonProperty.MCandleTimeType.M10:
case CommonProperty.MCandleTimeType.M15:
case CommonProperty.MCandleTimeType.M5:
case CommonProperty.MCandleTimeType.M3:
case CommonProperty.MCandleTimeType.M30:
case CommonProperty.MCandleTimeType.M5:
case CommonProperty.MCandleTimeType.M15:
break;
case CommonProperty.MCandleTimeType.D1:
_dateTime = Convert.ToDateTime(dateTime.ToString("yyyy-MM-dd")) + new TimeSpan(StartDateInterval, 0, 0, 0);
@@ -743,5 +836,12 @@ namespace Million_Hunter.HunterSubForm
aver.ToString();
}
private void comboBoxEdit_defaultTime_SelectedIndexChanged(object sender, EventArgs e)
{
Enum.TryParse(comboBoxEdit_defaultTime.SelectedItem.ToString(),
out CommonProperty.MCandleTimeType mCandleTimeType);
}
}
}

View File

@@ -143,7 +143,6 @@ namespace Million
M5 = 5,
M6 = 6,
M10 = 10,
M12 = 12,
M15 = 15,
M20 = 20,
M30 = 30,

View File

@@ -82,10 +82,10 @@ namespace Million.SubForm
visualRangeStartValueFix = new TimeSpan(0, 0, 1, 0);
break;
case CommonProperty.MCandleTimeType.M10:
case CommonProperty.MCandleTimeType.M15:
case CommonProperty.MCandleTimeType.M5:
case CommonProperty.MCandleTimeType.M3:
case CommonProperty.MCandleTimeType.M30:
case CommonProperty.MCandleTimeType.M5:
case CommonProperty.MCandleTimeType.M15:
visualRangeStartValueFix = new TimeSpan(0, 0, 1, 0);
break;
case CommonProperty.MCandleTimeType.D1:
@@ -145,12 +145,11 @@ namespace Million.SubForm
diagram.AxisX.DateTimeScaleOptions.MeasureUnit = DateTimeMeasureUnit.Hour;
viewRangeEndDate = startTime + new TimeSpan(0, setTimeInterval, 0, 0);
break;
case CommonProperty.MCandleTimeType.M1:
case CommonProperty.MCandleTimeType.M10:
case CommonProperty.MCandleTimeType.M15:
case CommonProperty.MCandleTimeType.M5:
case CommonProperty.MCandleTimeType.M3:
case CommonProperty.MCandleTimeType.M30:
case CommonProperty.MCandleTimeType.M5:
case CommonProperty.MCandleTimeType.M15:
diagram.AxisX.DateTimeScaleOptions.MeasureUnit = DateTimeMeasureUnit.Minute;
viewRangeEndDate = startTime + new TimeSpan(0, 0, setTimeInterval, 0);
break;