diff --git a/Million Hunter/HunterSubForm/TestBoardForm.Designer.cs b/Million Hunter/HunterSubForm/TestBoardForm.Designer.cs
index 50979c3..6974f55 100644
--- a/Million Hunter/HunterSubForm/TestBoardForm.Designer.cs
+++ b/Million Hunter/HunterSubForm/TestBoardForm.Designer.cs
@@ -103,23 +103,31 @@ namespace Million_Hunter.HunterSubForm
this.groupBox3.TabStop = false;
this.groupBox3.Text = "데이터 채우기";
//
- // simpleButton_Reset
+ // simpleButton_찬
//
- this.simpleButton_Reset.Appearance.ForeColor = System.Drawing.Color.SteelBlue;
- this.simpleButton_Reset.Appearance.Options.UseForeColor = true;
- this.simpleButton_Reset.Location = new System.Drawing.Point(6, 21);
- this.simpleButton_Reset.Name = "simpleButton_Reset";
- this.simpleButton_Reset.Size = new System.Drawing.Size(121, 32);
- this.simpleButton_Reset.TabIndex = 1;
- this.simpleButton_Reset.Text = "필터 초기화";
- this.simpleButton_Reset.Click += new System.EventHandler(this.simpleButton_Reset_Click);
+ this.simpleButton_찬.Location = new System.Drawing.Point(18, 225);
+ this.simpleButton_찬.Name = "simpleButton_찬";
+ this.simpleButton_찬.Size = new System.Drawing.Size(104, 32);
+ this.simpleButton_찬.TabIndex = 4;
+ this.simpleButton_찬.Text = "찬테스트";
+ this.simpleButton_찬.Click += new System.EventHandler(this.simpleButton_찬_Click);
+ //
+ // 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(0, 275);
+ this.progressBar1.Name = "progressBar1";
+ this.progressBar1.Size = new System.Drawing.Size(852, 23);
+ this.progressBar1.TabIndex = 5;
//
// TestBoardForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(853, 297);
- this.Controls.Add(this.groupBox3);
+ this.Controls.Add(this.progressBar1);
+ this.Controls.Add(this.simpleButton_찬);
+ this.Controls.Add(this.simpleButton_Calc);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Name = "TestBoardForm";
@@ -138,6 +146,10 @@ namespace Million_Hunter.HunterSubForm
private DevExpress.XtraEditors.SimpleButton simpleButton_FullInsertCandle;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
+ private System.Windows.Forms.CheckedListBox checkedListBox_Indicator;
+ private DevExpress.XtraEditors.SimpleButton simpleButton_Calc;
+ private DevExpress.XtraEditors.SimpleButton simpleButton_찬;
+ private System.Windows.Forms.ProgressBar progressBar1;
private DevExpress.XtraEditors.CheckEdit checkEdit_이전봉40_2볼린저이하;
private System.Windows.Forms.GroupBox groupBox3;
private DevExpress.XtraEditors.SimpleButton simpleButton_Reset;
diff --git a/Million Hunter/HunterSubForm/TestBoardForm.cs b/Million Hunter/HunterSubForm/TestBoardForm.cs
index 7bf2401..d97df08 100644
--- a/Million Hunter/HunterSubForm/TestBoardForm.cs
+++ b/Million Hunter/HunterSubForm/TestBoardForm.cs
@@ -333,5 +333,9 @@ namespace Million_Hunter.HunterSubForm
}
}
+ private void simpleButton_찬_Click(object sender, EventArgs e)
+ {
+
+ }
}
}
\ No newline at end of file
diff --git a/Million Hunter/Million Hunter.csproj b/Million Hunter/Million Hunter.csproj
index ba766f1..b7b5765 100644
--- a/Million Hunter/Million Hunter.csproj
+++ b/Million Hunter/Million Hunter.csproj
@@ -153,7 +153,6 @@
TestBoardForm.cs
-
ResXFileCodeGenerator
Resources.Designer.cs
diff --git a/Million/CommonProperty.cs b/Million/CommonProperty.cs
index ea5c132..b05acbe 100644
--- a/Million/CommonProperty.cs
+++ b/Million/CommonProperty.cs
@@ -121,7 +121,7 @@ namespace Million
단순비교 = 0,
돌파비교 = 1,
최초돌파 = 2,
- 크로스 = 3
+ 크로스 = 3
}
// 시가/고가/종가/저가
@@ -159,7 +159,8 @@ namespace Million
이동평균선 = 3,
ParabolicSAR = 4,
거래량비율 = 5,
- 가격비율 = 6
+ 가격비율 = 6,
+ 조건단순비교 =7
}
// 이동평균선 종류
@@ -367,5 +368,15 @@ namespace Million
///
public static Dictionary> subIndicatorStateManagement = new Dictionary>();
#endregion
+
+ #region Compare 조건문 Flag
+ public enum CompareType
+ {
+ Origin_Up_Compare_Down = 0,
+ Origin_UpOrSame_Compare_Down = 1,
+ Origin_Down_Compare_Up = 2,
+ Origin_DownOrSame_Compare_Up = 3
+ }
+ #endregion
}
}
diff --git a/Million/IndicatorConditionSetup/CompareConditionSetup.cs b/Million/IndicatorConditionSetup/CompareConditionSetup.cs
new file mode 100644
index 0000000..a7e5001
--- /dev/null
+++ b/Million/IndicatorConditionSetup/CompareConditionSetup.cs
@@ -0,0 +1,68 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using static Million.CommonProperty;
+
+namespace Million.IndicatorConditionSetup
+{
+ ///
+ /// Compare 조건식
+ ///
+ public class CompareConditionSetup : IndicatorCoditionSetup
+ {
+ ///
+ /// 기본 데이터
+ ///
+ public string Origin { get; set; }
+
+ ///
+ /// 조건 데이터
+ ///
+ public string Compare { get; set; }
+
+ ///
+ /// Compare 할 값
+ ///
+ public CompareType CompareType { get; set; }
+
+ ///
+ /// Clone
+ ///
+ ///
+ public object Clone()
+ {
+ var clone = new CompareConditionSetup
+ {
+ CandlePriceTypeFirstOver = CandlePriceTypeFirstOver,
+ OverStatusEnumListFirstOver = OverStatusEnumListFirstOver,
+ FirstOverSubRegExpression = FirstOverSubRegExpression,
+ CrossSubRegExpression = CrossSubRegExpression,
+ CrossCandlePriceType = CrossCandlePriceType,
+ CrossType = CrossType,
+ ByBuySellType = ByBuySellType,
+ IndicatorType = IndicatorType,
+ SubIndicatorSetupType = SubIndicatorSetupType,
+ CandlePriceType = CandlePriceType,
+ IndicatorOver = IndicatorOver,
+ OverStatusEnumList = OverStatusEnumList,
+ MCandleTimeType = MCandleTimeType,
+ Description = Description,
+ IndexString = IndexString,
+ Origin = Origin,
+ Compare = Compare,
+ CompareType = CompareType
+ };
+ return clone;
+ }
+
+ public override string GetKeyName(bool IndexStr = false)
+ {
+ var key = "Compare" + Origin + Compare;
+ if (IndexStr)
+ return IndexString + key;
+ return key;
+ }
+ }
+}
diff --git a/Million/IndicatorConditionSetup/IndicatorCoditionSetup.cs b/Million/IndicatorConditionSetup/IndicatorCoditionSetup.cs
index 9bdd9aa..8d7d1be 100644
--- a/Million/IndicatorConditionSetup/IndicatorCoditionSetup.cs
+++ b/Million/IndicatorConditionSetup/IndicatorCoditionSetup.cs
@@ -72,9 +72,6 @@ namespace Million.IndicatorConditionSetup
{
return false;
}
-
-
-
if (obj.GetType() == typeof(BolingerConditionSetup))
{
var thisBol = (BolingerConditionSetup)this;
@@ -103,6 +100,14 @@ namespace Million.IndicatorConditionSetup
thisMov.MACandlePriceType == objMov.MACandlePriceType &&
thisMov.MovingAverageType == objMov.MovingAverageType;
}
+ else if (obj.GetType() == typeof(CompareConditionSetup)) {
+ var objCompare = (CompareConditionSetup)obj;
+ var thisCompare = (CompareConditionSetup)this;
+ return objCompare.Origin == thisCompare.Origin &&
+ objCompare.Compare == thisCompare.Compare &&
+ objCompare.CompareType == thisCompare.CompareType;
+ }
+
return base.Equals(obj);
}
diff --git a/Million/Manager/CalculateManager.cs b/Million/Manager/CalculateManager.cs
index 04541ca..3223b45 100644
--- a/Million/Manager/CalculateManager.cs
+++ b/Million/Manager/CalculateManager.cs
@@ -345,6 +345,11 @@ namespace Million.Manager
RateValue(setUp, parentCandleDataList, childrenCandleDataList, buyData);
}
}
+ //조건 단순비교
+ else if (setUp.IndicatorType == IndicatorType.조건단순비교)
+ {
+ CompareSimpleComparison(setUp, totalIndicator, parentCandleDataList, childrenCandleDataList);
+ }
//돌파
else if (setUp.SubIndicatorSetupType == SubIndicatorSetupType.돌파비교)
{
@@ -367,6 +372,99 @@ namespace Million.Manager
for (var i = 0; i < 3; i++)
CrossCondition(setUp, parentCandleDataList, childrenCandleDataList, subIndicator, i);
}
+
+ }
+
+ ///
+ /// 조건 단순 비교
+ ///
+ ///
+ ///
+ ///
+ ///
+ private static void CompareSimpleComparison(IndicatorCoditionSetup setUp, List totalIndicator, List parentCandleDataList, List childrenCandleDataList)
+ {
+ //TODO 추후 Value 가 필요할 수 도 있으나 현재는 필요없어서 안씀
+
+ var cSetup = (CompareConditionSetup)setUp;
+
+ var key = GetKeyData(cSetup);
+
+ var originSetup = totalIndicator.FirstOrDefault(t => t.IndexString == cSetup.Origin);
+ var originKey = GetKeyData(originSetup);
+ var originVal = 0.0;
+
+ var compareSetup = totalIndicator.FirstOrDefault(t => t.IndexString == cSetup.Compare);
+ var compareKey = GetKeyData(compareSetup);
+ var compareVal = 0.0;
+
+ foreach (var parent in parentCandleDataList)
+ {
+ if (!(parent.IndicatorDic.ContainsKey(originKey) && parent.IndicatorDic.ContainsKey(compareKey)))
+ continue;
+
+ var originValueList = new List();
+ var compareValueList = new List();
+
+ originValueList.Add(parent.IndicatorDic[originKey].value);
+ compareValueList.Add(parent.IndicatorDic[compareKey].value);
+
+ if (originSetup.CandlePriceType == CandlePriceType.종가)
+ {
+ originValueList.Add(parent.IndicatorDic[originKey].highValue);
+ originValueList.Add(parent.IndicatorDic[originKey].lowValue);
+ }
+ if (compareSetup.CandlePriceType == CandlePriceType.종가)
+ {
+ compareValueList.Add(parent.IndicatorDic[compareKey].highValue);
+ compareValueList.Add(parent.IndicatorDic[compareKey].lowValue);
+ }
+
+ var cnt = originValueList.Count >= compareValueList.Count ? originValueList.Count : compareValueList.Count;
+
+ for (var i = 0; i < cnt; i++)
+ {
+ if (parent.CalculateFlag[cSetup.IndexString]) break;
+
+ if (originValueList.Count < i)
+ {
+ originVal = originValueList[originValueList.Count - 1];
+ }
+ else
+ {
+ originVal = originValueList[i];
+ }
+
+ if (compareValueList.Count < i)
+ {
+ compareVal = compareValueList[compareValueList.Count - 1];
+ }
+ else
+ {
+ compareVal = compareValueList[i];
+ }
+
+ if ((cSetup.CompareType == CompareType.Origin_Up_Compare_Down && originVal > compareVal) ||
+ (cSetup.CompareType == CompareType.Origin_UpOrSame_Compare_Down && originVal >= compareVal) ||
+ (cSetup.CompareType == CompareType.Origin_Down_Compare_Up && originVal < compareVal) ||
+ (cSetup.CompareType == CompareType.Origin_DownOrSame_Compare_Up && originVal <= compareVal))
+ {
+ parent.CalculateFlag[cSetup.IndexString] = true;
+
+ parent.IndicatorDic[key] = new IndicatorData();
+ parent.IndicatorDic[key].value = parent.EndValue;
+
+ var childList = GetChildrenDatas(parent, cSetup.MCandleTimeType, childrenCandleDataList);
+
+ foreach (var item in childList)
+ {
+ item.CalculateFlag[cSetup.IndexString] = true;
+ item.IndicatorDic[key] = new IndicatorData();
+ item.IndicatorDic[key].value = item.EndValue;
+ }
+ }
+ }
+ }
}
///
@@ -491,7 +589,7 @@ namespace Million.Manager
if (string.IsNullOrWhiteSpace(setUp.CrossSubRegExpression))
{
foreach (var item in childrenCandleDataList)
- item.CalculateFlag[key] = false;
+ item.CalculateFlag[setUp.IndexString] = false;
return;
}
var subSetup = subIndicatorList.FirstOrDefault(t => t.IndexString == setUp.CrossSubRegExpression);
diff --git a/Million/Manager/DataManager.cs b/Million/Manager/DataManager.cs
index ff5a64a..54b7e12 100644
--- a/Million/Manager/DataManager.cs
+++ b/Million/Manager/DataManager.cs
@@ -126,14 +126,24 @@ namespace Million.Manager
{
// 최초와 cross의 조건먼저 계산이 필요함(선처리)
var parentIndicator = totalIndicator.Where(t => t.SubIndicatorSetupType == CommonProperty.SubIndicatorSetupType.최초돌파 ||
- t.SubIndicatorSetupType == CommonProperty.SubIndicatorSetupType.크로스).ToList();
+ t.SubIndicatorSetupType == CommonProperty.SubIndicatorSetupType.크로스 || t.IndicatorType == IndicatorType.조건단순비교).ToList();
var subIndStringiList = new List();
foreach (var item in parentIndicator)
{
- var subRegExpression = item.FirstOverSubRegExpression;
- if (item.SubIndicatorSetupType == CommonProperty.SubIndicatorSetupType.크로스)
+ var subRegExpression = "";
+ if (item.IndicatorType == CommonProperty.IndicatorType.조건단순비교)
+ {
+ subRegExpression = ((CompareConditionSetup)item).Origin + "," + ((CompareConditionSetup)item).Compare;
+ }
+ else if (item.SubIndicatorSetupType == CommonProperty.SubIndicatorSetupType.크로스)
+ {
subRegExpression = item.CrossSubRegExpression;
+ }
+ else
+ {
+ subRegExpression = item.FirstOverSubRegExpression;
+ }
subIndStringiList.AddRange(subRegExpression.Split(',').ToList());
}
subIndStringiList = subIndStringiList.Distinct().ToList();
diff --git a/Million/Manager/IndicatorSetupManager.cs b/Million/Manager/IndicatorSetupManager.cs
index d8f0bf8..075219f 100644
--- a/Million/Manager/IndicatorSetupManager.cs
+++ b/Million/Manager/IndicatorSetupManager.cs
@@ -35,10 +35,12 @@ namespace Million.Manager
else if (setup.GetType() == typeof(PriceRateCondtionSetup))
{
indicatorList.Add((PriceRateCondtionSetup)setup);
+ }else if(setup.GetType() == typeof(CompareConditionSetup))
+ {
+ indicatorList.Add((CompareConditionSetup)setup);
}
}
-
return indicatorList;
}
diff --git a/Million/Million Core.csproj b/Million/Million Core.csproj
index a2b2473..0003439 100644
--- a/Million/Million Core.csproj
+++ b/Million/Million Core.csproj
@@ -179,6 +179,7 @@
+
@@ -261,6 +262,12 @@
MovingAverageSetupUserForm.cs
+
+ UserControl
+
+
+ CompareSetupUserForm.cs
+
UserControl
@@ -325,6 +332,9 @@
MovingAverageSetupUserForm.cs
+
+ CompareSetupUserForm.cs
+
ParabolicSarSetupUserForm.cs
diff --git a/Million/SubForm/IndicatorSetupForm/CommonIndicatorSetupUserForm.cs b/Million/SubForm/IndicatorSetupForm/CommonIndicatorSetupUserForm.cs
index a7b61f4..56d8bdf 100644
--- a/Million/SubForm/IndicatorSetupForm/CommonIndicatorSetupUserForm.cs
+++ b/Million/SubForm/IndicatorSetupForm/CommonIndicatorSetupUserForm.cs
@@ -96,6 +96,9 @@ namespace Million.HunterSubForm.IndicatorSetupForm
case CommonProperty.IndicatorType.ParabolicSAR:
_indicatorSetupData = new ParabolicSarIndicatorConditionSetup();
break;
+ case CommonProperty.IndicatorType.조건단순비교:
+ _indicatorSetupData = new CompareConditionSetup();
+ break;
}
// Over Status (중복선택 가능, Over, OverCancle 설정)
@@ -198,6 +201,13 @@ namespace Million.HunterSubForm.IndicatorSetupForm
_curruentIndicatorSpecSetupform = new ParabolicSarSetupUserForm(_indicatorSetupData, _isCreate)
{ Dock = DockStyle.Fill };
break;
+
+ case CommonProperty.IndicatorType.조건단순비교:
+ _curruentIndicatorSpecSetupform = new CompareSetupUserForm(_indicatorSetupData, _isCreate)
+ { Dock = DockStyle.Fill };
+ comboBoxEdit_CandleDateTime.Enabled = false;
+ xtraTabControl_SubIndicatorSetup.Enabled = false;
+ break;
}
// 그룹박스에 Sepc Indicator Setup 폼 추가
@@ -307,7 +317,7 @@ namespace Million.HunterSubForm.IndicatorSetupForm
case CommonProperty.SubIndicatorSetupType.크로스:
_indicatorSetupData.Description +=
$",크로스[{_indicatorSetupData.CrossType},정규식({_indicatorSetupData.CrossSubRegExpression})]";
- break;
+ break;
}
}
@@ -329,7 +339,10 @@ namespace Million.HunterSubForm.IndicatorSetupForm
case CommonProperty.IndicatorType.ParabolicSAR:
((ParabolicSarSetupUserForm)_curruentIndicatorSpecSetupform).SaveIndicatorSetup(_indicatorSetupData);
return ((ParabolicSarIndicatorConditionSetup)_indicatorSetupData).Clone();
- }
+ case CommonProperty.IndicatorType.조건단순비교:
+ ((CompareSetupUserForm)_curruentIndicatorSpecSetupform).SaveIndicatorSetup(_indicatorSetupData);
+ return ((CompareConditionSetup)_indicatorSetupData).Clone();
+ }
return _indicatorSetupData;
}
}
diff --git a/Million/SubForm/IndicatorSetupForm/CompareSetupUserForm.Designer.cs b/Million/SubForm/IndicatorSetupForm/CompareSetupUserForm.Designer.cs
new file mode 100644
index 0000000..d404dda
--- /dev/null
+++ b/Million/SubForm/IndicatorSetupForm/CompareSetupUserForm.Designer.cs
@@ -0,0 +1,133 @@
+
+namespace Million.HunterSubForm.IndicatorSetupForm
+{
+ partial class CompareSetupUserForm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.te_Origin = new DevExpress.XtraEditors.TextEdit();
+ this.labelControl_IndicatorName = new DevExpress.XtraEditors.LabelControl();
+ this.labelControl3 = new DevExpress.XtraEditors.LabelControl();
+ this.te_Compare = new DevExpress.XtraEditors.TextEdit();
+ this.labelControl1 = new DevExpress.XtraEditors.LabelControl();
+ this.cb_Type = new DevExpress.XtraEditors.ComboBoxEdit();
+ this.labelControl2 = new DevExpress.XtraEditors.LabelControl();
+ ((System.ComponentModel.ISupportInitialize)(this.te_Origin.Properties)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.te_Compare.Properties)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.cb_Type.Properties)).BeginInit();
+ this.SuspendLayout();
+ //
+ // te_Origin
+ //
+ this.te_Origin.Location = new System.Drawing.Point(83, 20);
+ this.te_Origin.Name = "te_Origin";
+ this.te_Origin.Properties.Mask.EditMask = "d";
+ this.te_Origin.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
+ this.te_Origin.Size = new System.Drawing.Size(91, 20);
+ this.te_Origin.TabIndex = 3;
+ //
+ // labelControl_IndicatorName
+ //
+ this.labelControl_IndicatorName.Location = new System.Drawing.Point(3, 3);
+ this.labelControl_IndicatorName.Name = "labelControl_IndicatorName";
+ this.labelControl_IndicatorName.Size = new System.Drawing.Size(20, 14);
+ this.labelControl_IndicatorName.TabIndex = 9;
+ this.labelControl_IndicatorName.Text = "지표";
+ //
+ // labelControl3
+ //
+ this.labelControl3.Location = new System.Drawing.Point(28, 23);
+ this.labelControl3.Name = "labelControl3";
+ this.labelControl3.Size = new System.Drawing.Size(49, 14);
+ this.labelControl3.TabIndex = 2;
+ this.labelControl3.Text = "Origin(A)";
+ //
+ // te_Compare
+ //
+ this.te_Compare.Location = new System.Drawing.Point(83, 46);
+ this.te_Compare.Name = "te_Compare";
+ this.te_Compare.Properties.Mask.EditMask = "d";
+ this.te_Compare.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
+ this.te_Compare.Size = new System.Drawing.Size(91, 20);
+ this.te_Compare.TabIndex = 11;
+ //
+ // labelControl1
+ //
+ this.labelControl1.Location = new System.Drawing.Point(12, 49);
+ this.labelControl1.Name = "labelControl1";
+ this.labelControl1.Size = new System.Drawing.Size(65, 14);
+ this.labelControl1.TabIndex = 10;
+ this.labelControl1.Text = "Compare(B)";
+ //
+ // cb_Type
+ //
+ this.cb_Type.Location = new System.Drawing.Point(83, 72);
+ this.cb_Type.Name = "cb_Type";
+ this.cb_Type.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+ new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+ this.cb_Type.Size = new System.Drawing.Size(91, 20);
+ this.cb_Type.TabIndex = 19;
+ //
+ // labelControl2
+ //
+ this.labelControl2.Location = new System.Drawing.Point(49, 75);
+ this.labelControl2.Name = "labelControl2";
+ this.labelControl2.Size = new System.Drawing.Size(28, 14);
+ this.labelControl2.TabIndex = 20;
+ this.labelControl2.Text = "Type";
+ //
+ // CompareSetupUserForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.labelControl2);
+ this.Controls.Add(this.cb_Type);
+ this.Controls.Add(this.te_Compare);
+ this.Controls.Add(this.labelControl1);
+ this.Controls.Add(this.labelControl_IndicatorName);
+ this.Controls.Add(this.te_Origin);
+ this.Controls.Add(this.labelControl3);
+ this.Name = "CompareSetupUserForm";
+ this.Size = new System.Drawing.Size(196, 111);
+ ((System.ComponentModel.ISupportInitialize)(this.te_Origin.Properties)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.te_Compare.Properties)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.cb_Type.Properties)).EndInit();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+ private DevExpress.XtraEditors.TextEdit te_Origin;
+ private DevExpress.XtraEditors.LabelControl labelControl_IndicatorName;
+ private DevExpress.XtraEditors.LabelControl labelControl3;
+ private DevExpress.XtraEditors.TextEdit te_Compare;
+ private DevExpress.XtraEditors.LabelControl labelControl1;
+ private DevExpress.XtraEditors.ComboBoxEdit cb_Type;
+ private DevExpress.XtraEditors.LabelControl labelControl2;
+ }
+}
diff --git a/Million/SubForm/IndicatorSetupForm/CompareSetupUserForm.cs b/Million/SubForm/IndicatorSetupForm/CompareSetupUserForm.cs
new file mode 100644
index 0000000..62368fd
--- /dev/null
+++ b/Million/SubForm/IndicatorSetupForm/CompareSetupUserForm.cs
@@ -0,0 +1,61 @@
+using DevExpress.XtraEditors;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using Million;
+using Million.IndicatorConditionSetup;
+
+namespace Million.HunterSubForm.IndicatorSetupForm
+{
+ public partial class CompareSetupUserForm : DevExpress.XtraEditors.XtraUserControl
+ {
+ private CompareConditionSetup _compareConditionSetup;
+ private bool _isCreate = false;
+
+ public CompareSetupUserForm(object compareConditionSetup, bool IsCreate)
+ {
+ InitializeComponent();
+
+ _compareConditionSetup = (CompareConditionSetup)compareConditionSetup;
+ _isCreate = IsCreate;
+
+ InitForm();
+ }
+
+ private void InitForm()
+ {
+ labelControl_IndicatorName.Text = @"조건단순비교";
+ cb_Type.Properties.Items.AddRange(Enum.GetNames(enumType: typeof(CommonProperty.CompareType)));
+ }
+
+ // Indicator 정보 저장
+ public void SaveIndicatorSetup(object indicatorSetupData)
+ {
+ // 예외처리 필요
+ var compareConditionSetup = (CompareConditionSetup) indicatorSetupData;
+
+ //지표 설정
+ compareConditionSetup.IndicatorType = CommonProperty.IndicatorType.조건단순비교;
+ compareConditionSetup.Origin = te_Origin.Text;
+ compareConditionSetup.Compare = te_Compare.Text;
+
+ Enum.TryParse(cb_Type.SelectedItem.ToString(),
+ out CommonProperty.CompareType type);
+ compareConditionSetup.CompareType = type;
+
+ var description =
+ $"[{compareConditionSetup.Origin}," +
+ $"{compareConditionSetup.Compare}," +
+ $"{compareConditionSetup.CompareType}]";
+
+ compareConditionSetup.Description = description + compareConditionSetup.Description;
+ }
+
+ }
+}
diff --git a/Million/SubForm/IndicatorSetupForm/CompareSetupUserForm.resx b/Million/SubForm/IndicatorSetupForm/CompareSetupUserForm.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/Million/SubForm/IndicatorSetupForm/CompareSetupUserForm.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file