- 시뮬레이션 작업 중

This commit is contained in:
2017-02-22 02:48:30 +09:00
parent 3611071c18
commit c45f463406
3 changed files with 484 additions and 438 deletions

788
AutoSeller.Designer.cs generated
View File

@@ -36,30 +36,7 @@
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
this.lvItems = new AutoSellerNS.ListViewNF();
this.chCode = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chCodeName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chCurPrice = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chCount = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chBookValue = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chCapitalGains = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chAssessedValue = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chValuation = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chYield = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chMaxPrice = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chCheckCount = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.lvNCItem = new AutoSellerNS.ListViewNF();
this.chNCCode = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chNCCodeName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chNCType = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chNCPrice = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chNCCount = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.tbLog = new System.Windows.Forms.RichTextBox();
this.lvCurPrice = new AutoSellerNS.ListViewNF();
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chAskCount = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chCallPrice = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chBidCount = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.btUpdate = new MaterialSkin.Controls.MaterialRaisedButton();
this.btCybos = new MaterialSkin.Controls.MaterialRaisedButton();
this.tabPage2 = new System.Windows.Forms.TabPage();
@@ -79,13 +56,38 @@
this.tabPage3 = new System.Windows.Forms.TabPage();
this.cbSMMethod = new System.Windows.Forms.ComboBox();
this.tbSMListSize = new System.Windows.Forms.TextBox();
this.tbSMSlowCnt = new System.Windows.Forms.TextBox();
this.tbSMSlowUpCnt = new System.Windows.Forms.TextBox();
this.tbSMSlowSD = new System.Windows.Forms.TextBox();
this.tbSMFastCnt = new System.Windows.Forms.TextBox();
this.tbSMFastUpCnt = new System.Windows.Forms.TextBox();
this.tbSMFastSD = new System.Windows.Forms.TextBox();
this.tbSimulationLog = new System.Windows.Forms.RichTextBox();
this.btSimulate = new MaterialSkin.Controls.MaterialFlatButton();
this.btLoad = new MaterialSkin.Controls.MaterialFlatButton();
this.tbSMFastDownCnt = new System.Windows.Forms.TextBox();
this.tbSMSlowDownCnt = new System.Windows.Forms.TextBox();
this.lvItems = new AutoSellerNS.ListViewNF();
this.chCode = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chCodeName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chCurPrice = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chCount = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chBookValue = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chCapitalGains = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chAssessedValue = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chValuation = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chYield = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chMaxPrice = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chCheckCount = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.lvNCItem = new AutoSellerNS.ListViewNF();
this.chNCCode = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chNCCodeName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chNCType = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chNCPrice = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chNCCount = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.lvCurPrice = new AutoSellerNS.ListViewNF();
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chAskCount = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chCallPrice = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.chBidCount = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.materialTabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
@@ -218,6 +220,380 @@
this.splitContainer3.SplitterDistance = 300;
this.splitContainer3.TabIndex = 1;
//
// tbLog
//
this.tbLog.Dock = System.Windows.Forms.DockStyle.Fill;
this.tbLog.Location = new System.Drawing.Point(0, 0);
this.tbLog.Name = "tbLog";
this.tbLog.Size = new System.Drawing.Size(804, 196);
this.tbLog.TabIndex = 0;
this.tbLog.Text = "";
//
// btUpdate
//
this.btUpdate.AutoSize = true;
this.btUpdate.Depth = 0;
this.btUpdate.Location = new System.Drawing.Point(74, 3);
this.btUpdate.MouseState = MaterialSkin.MouseState.HOVER;
this.btUpdate.Name = "btUpdate";
this.btUpdate.Primary = true;
this.btUpdate.Size = new System.Drawing.Size(68, 28);
this.btUpdate.TabIndex = 3;
this.btUpdate.Text = "Update";
this.btUpdate.UseVisualStyleBackColor = true;
this.btUpdate.Click += new System.EventHandler(this.btUpdate_Click);
//
// btCybos
//
this.btCybos.AutoSize = true;
this.btCybos.Depth = 0;
this.btCybos.Location = new System.Drawing.Point(3, 3);
this.btCybos.MouseState = MaterialSkin.MouseState.HOVER;
this.btCybos.Name = "btCybos";
this.btCybos.Primary = true;
this.btCybos.Size = new System.Drawing.Size(66, 28);
this.btCybos.TabIndex = 3;
this.btCybos.Text = "Cybos";
this.btCybos.UseVisualStyleBackColor = true;
this.btCybos.Click += new System.EventHandler(this.btCybos_Click);
//
// tabPage2
//
this.tabPage2.BackColor = System.Drawing.Color.White;
this.tabPage2.Controls.Add(this.materialLabel7);
this.tabPage2.Controls.Add(this.tbTrailingCnt);
this.tabPage2.Controls.Add(this.materialLabel6);
this.tabPage2.Controls.Add(this.tbTrailingP);
this.tabPage2.Controls.Add(this.materialLabel5);
this.tabPage2.Controls.Add(this.materialLabel4);
this.tabPage2.Controls.Add(this.materialLabel3);
this.tabPage2.Controls.Add(this.materialLabel2);
this.tabPage2.Controls.Add(this.tbBidCount);
this.tabPage2.Controls.Add(this.materialLabel1);
this.tabPage2.Controls.Add(this.btApply);
this.tabPage2.Controls.Add(this.tbSubAccount);
this.tabPage2.Controls.Add(this.cbAccount);
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(1060, 693);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Preference";
//
// materialLabel7
//
this.materialLabel7.AutoSize = true;
this.materialLabel7.Depth = 0;
this.materialLabel7.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F);
this.materialLabel7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.materialLabel7.Location = new System.Drawing.Point(224, 229);
this.materialLabel7.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel7.Name = "materialLabel7";
this.materialLabel7.Size = new System.Drawing.Size(21, 18);
this.materialLabel7.TabIndex = 12;
this.materialLabel7.Text = "회";
//
// tbTrailingCnt
//
this.tbTrailingCnt.Depth = 0;
this.tbTrailingCnt.Hint = "";
this.tbTrailingCnt.Location = new System.Drawing.Point(188, 225);
this.tbTrailingCnt.MouseState = MaterialSkin.MouseState.HOVER;
this.tbTrailingCnt.Name = "tbTrailingCnt";
this.tbTrailingCnt.PasswordChar = '\0';
this.tbTrailingCnt.SelectedText = "";
this.tbTrailingCnt.SelectionLength = 0;
this.tbTrailingCnt.SelectionStart = 0;
this.tbTrailingCnt.Size = new System.Drawing.Size(30, 23);
this.tbTrailingCnt.TabIndex = 11;
this.tbTrailingCnt.Text = "2";
this.tbTrailingCnt.UseSystemPasswordChar = false;
//
// materialLabel6
//
this.materialLabel6.AutoSize = true;
this.materialLabel6.Depth = 0;
this.materialLabel6.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F);
this.materialLabel6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.materialLabel6.Location = new System.Drawing.Point(152, 229);
this.materialLabel6.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel6.Name = "materialLabel6";
this.materialLabel6.Size = new System.Drawing.Size(21, 18);
this.materialLabel6.TabIndex = 10;
this.materialLabel6.Text = "%";
//
// tbTrailingP
//
this.tbTrailingP.Depth = 0;
this.tbTrailingP.Hint = "";
this.tbTrailingP.Location = new System.Drawing.Point(116, 225);
this.tbTrailingP.MouseState = MaterialSkin.MouseState.HOVER;
this.tbTrailingP.Name = "tbTrailingP";
this.tbTrailingP.PasswordChar = '\0';
this.tbTrailingP.SelectedText = "";
this.tbTrailingP.SelectionLength = 0;
this.tbTrailingP.SelectionStart = 0;
this.tbTrailingP.Size = new System.Drawing.Size(30, 23);
this.tbTrailingP.TabIndex = 9;
this.tbTrailingP.Text = "1.0";
this.tbTrailingP.UseSystemPasswordChar = false;
//
// materialLabel5
//
this.materialLabel5.AutoSize = true;
this.materialLabel5.Depth = 0;
this.materialLabel5.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F);
this.materialLabel5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.materialLabel5.Location = new System.Drawing.Point(25, 229);
this.materialLabel5.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel5.Name = "materialLabel5";
this.materialLabel5.Size = new System.Drawing.Size(77, 18);
this.materialLabel5.TabIndex = 8;
this.materialLabel5.Text = "최고가 대비";
//
// materialLabel4
//
this.materialLabel4.AutoSize = true;
this.materialLabel4.Depth = 0;
this.materialLabel4.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F);
this.materialLabel4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.materialLabel4.Location = new System.Drawing.Point(25, 144);
this.materialLabel4.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel4.Name = "materialLabel4";
this.materialLabel4.Size = new System.Drawing.Size(64, 18);
this.materialLabel4.TabIndex = 7;
this.materialLabel4.Text = "조건 횟수";
//
// materialLabel3
//
this.materialLabel3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.materialLabel3.AutoSize = true;
this.materialLabel3.Depth = 0;
this.materialLabel3.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F);
this.materialLabel3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.materialLabel3.Location = new System.Drawing.Point(6, 671);
this.materialLabel3.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel3.Name = "materialLabel3";
this.materialLabel3.Size = new System.Drawing.Size(162, 18);
this.materialLabel3.TabIndex = 6;
this.materialLabel3.Text = "Version : 2017.02.20.12";
//
// materialLabel2
//
this.materialLabel2.AutoSize = true;
this.materialLabel2.Depth = 0;
this.materialLabel2.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F);
this.materialLabel2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.materialLabel2.Location = new System.Drawing.Point(152, 148);
this.materialLabel2.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel2.Name = "materialLabel2";
this.materialLabel2.Size = new System.Drawing.Size(21, 18);
this.materialLabel2.TabIndex = 5;
this.materialLabel2.Text = "회";
//
// tbBidCount
//
this.tbBidCount.Depth = 0;
this.tbBidCount.Hint = "";
this.tbBidCount.Location = new System.Drawing.Point(116, 144);
this.tbBidCount.MouseState = MaterialSkin.MouseState.HOVER;
this.tbBidCount.Name = "tbBidCount";
this.tbBidCount.PasswordChar = '\0';
this.tbBidCount.SelectedText = "";
this.tbBidCount.SelectionLength = 0;
this.tbBidCount.SelectionStart = 0;
this.tbBidCount.Size = new System.Drawing.Size(30, 23);
this.tbBidCount.TabIndex = 4;
this.tbBidCount.Text = "5";
this.tbBidCount.UseSystemPasswordChar = false;
//
// materialLabel1
//
this.materialLabel1.AutoSize = true;
this.materialLabel1.Depth = 0;
this.materialLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F);
this.materialLabel1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.materialLabel1.Location = new System.Drawing.Point(25, 29);
this.materialLabel1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel1.Name = "materialLabel1";
this.materialLabel1.Size = new System.Drawing.Size(62, 18);
this.materialLabel1.TabIndex = 3;
this.materialLabel1.Text = "Account";
//
// btApply
//
this.btApply.AutoSize = true;
this.btApply.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.btApply.Depth = 0;
this.btApply.Location = new System.Drawing.Point(844, 483);
this.btApply.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
this.btApply.MinimumSize = new System.Drawing.Size(120, 36);
this.btApply.MouseState = MaterialSkin.MouseState.HOVER;
this.btApply.Name = "btApply";
this.btApply.Primary = false;
this.btApply.Size = new System.Drawing.Size(120, 36);
this.btApply.TabIndex = 2;
this.btApply.Text = "적용하기";
this.btApply.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btApply.UseVisualStyleBackColor = true;
this.btApply.Click += new System.EventHandler(this.btApply_Click);
//
// tbSubAccount
//
this.tbSubAccount.Depth = 0;
this.tbSubAccount.Hint = "";
this.tbSubAccount.Location = new System.Drawing.Point(154, 62);
this.tbSubAccount.MouseState = MaterialSkin.MouseState.HOVER;
this.tbSubAccount.Name = "tbSubAccount";
this.tbSubAccount.PasswordChar = '\0';
this.tbSubAccount.SelectedText = "";
this.tbSubAccount.SelectionLength = 0;
this.tbSubAccount.SelectionStart = 0;
this.tbSubAccount.Size = new System.Drawing.Size(25, 23);
this.tbSubAccount.TabIndex = 1;
this.tbSubAccount.Text = "10";
this.tbSubAccount.UseSystemPasswordChar = false;
//
// cbAccount
//
this.cbAccount.FormattingEnabled = true;
this.cbAccount.Location = new System.Drawing.Point(25, 62);
this.cbAccount.Name = "cbAccount";
this.cbAccount.Size = new System.Drawing.Size(121, 20);
this.cbAccount.TabIndex = 0;
//
// tabPage3
//
this.tabPage3.Controls.Add(this.tbSMSlowDownCnt);
this.tabPage3.Controls.Add(this.tbSMFastDownCnt);
this.tabPage3.Controls.Add(this.cbSMMethod);
this.tabPage3.Controls.Add(this.tbSMListSize);
this.tabPage3.Controls.Add(this.tbSMSlowUpCnt);
this.tabPage3.Controls.Add(this.tbSMSlowSD);
this.tabPage3.Controls.Add(this.tbSMFastUpCnt);
this.tabPage3.Controls.Add(this.tbSMFastSD);
this.tabPage3.Controls.Add(this.tbSimulationLog);
this.tabPage3.Controls.Add(this.btSimulate);
this.tabPage3.Controls.Add(this.btLoad);
this.tabPage3.Location = new System.Drawing.Point(4, 22);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
this.tabPage3.Size = new System.Drawing.Size(1060, 693);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "Simulation";
this.tabPage3.UseVisualStyleBackColor = true;
//
// cbSMMethod
//
this.cbSMMethod.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbSMMethod.FormattingEnabled = true;
this.cbSMMethod.Items.AddRange(new object[] {
"평균 비교",
"마지막 비교"});
this.cbSMMethod.Location = new System.Drawing.Point(477, 24);
this.cbSMMethod.Name = "cbSMMethod";
this.cbSMMethod.Size = new System.Drawing.Size(121, 20);
this.cbSMMethod.TabIndex = 9;
//
// tbSMListSize
//
this.tbSMListSize.Location = new System.Drawing.Point(333, 20);
this.tbSMListSize.Name = "tbSMListSize";
this.tbSMListSize.Size = new System.Drawing.Size(36, 21);
this.tbSMListSize.TabIndex = 3;
this.tbSMListSize.Text = "20";
//
// tbSMSlowUpCnt
//
this.tbSMSlowUpCnt.Location = new System.Drawing.Point(375, 74);
this.tbSMSlowUpCnt.Name = "tbSMSlowUpCnt";
this.tbSMSlowUpCnt.Size = new System.Drawing.Size(36, 21);
this.tbSMSlowUpCnt.TabIndex = 7;
this.tbSMSlowUpCnt.Text = "0.1";
//
// tbSMSlowSD
//
this.tbSMSlowSD.Location = new System.Drawing.Point(333, 74);
this.tbSMSlowSD.Name = "tbSMSlowSD";
this.tbSMSlowSD.Size = new System.Drawing.Size(36, 21);
this.tbSMSlowSD.TabIndex = 6;
this.tbSMSlowSD.Text = "0.2";
//
// tbSMFastUpCnt
//
this.tbSMFastUpCnt.Location = new System.Drawing.Point(375, 47);
this.tbSMFastUpCnt.Name = "tbSMFastUpCnt";
this.tbSMFastUpCnt.Size = new System.Drawing.Size(36, 21);
this.tbSMFastUpCnt.TabIndex = 5;
this.tbSMFastUpCnt.Text = "0.3";
//
// tbSMFastSD
//
this.tbSMFastSD.Location = new System.Drawing.Point(333, 47);
this.tbSMFastSD.Name = "tbSMFastSD";
this.tbSMFastSD.Size = new System.Drawing.Size(36, 21);
this.tbSMFastSD.TabIndex = 4;
this.tbSMFastSD.Text = "0.75";
//
// tbSimulationLog
//
this.tbSimulationLog.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tbSimulationLog.Location = new System.Drawing.Point(0, 204);
this.tbSimulationLog.Name = "tbSimulationLog";
this.tbSimulationLog.Size = new System.Drawing.Size(1060, 489);
this.tbSimulationLog.TabIndex = 2;
this.tbSimulationLog.Text = "";
//
// btSimulate
//
this.btSimulate.AutoSize = true;
this.btSimulate.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.btSimulate.Depth = 0;
this.btSimulate.Location = new System.Drawing.Point(44, 95);
this.btSimulate.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
this.btSimulate.MouseState = MaterialSkin.MouseState.HOVER;
this.btSimulate.Name = "btSimulate";
this.btSimulate.Primary = false;
this.btSimulate.Size = new System.Drawing.Size(139, 36);
this.btSimulate.TabIndex = 1;
this.btSimulate.Text = "simulation start";
this.btSimulate.UseVisualStyleBackColor = true;
this.btSimulate.Click += new System.EventHandler(this.btSimulate_Click);
//
// btLoad
//
this.btLoad.AutoSize = true;
this.btLoad.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.btLoad.Depth = 0;
this.btLoad.Location = new System.Drawing.Point(44, 47);
this.btLoad.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
this.btLoad.MouseState = MaterialSkin.MouseState.HOVER;
this.btLoad.Name = "btLoad";
this.btLoad.Primary = false;
this.btLoad.Size = new System.Drawing.Size(86, 36);
this.btLoad.TabIndex = 0;
this.btLoad.Text = "Load data";
this.btLoad.UseVisualStyleBackColor = true;
this.btLoad.Click += new System.EventHandler(this.btLoad_Click);
//
// tbSMFastDownCnt
//
this.tbSMFastDownCnt.Location = new System.Drawing.Point(417, 47);
this.tbSMFastDownCnt.Name = "tbSMFastDownCnt";
this.tbSMFastDownCnt.Size = new System.Drawing.Size(36, 21);
this.tbSMFastDownCnt.TabIndex = 6;
this.tbSMFastDownCnt.Text = "0.3";
//
// tbSMSlowDownCnt
//
this.tbSMSlowDownCnt.Location = new System.Drawing.Point(417, 74);
this.tbSMSlowDownCnt.Name = "tbSMSlowDownCnt";
this.tbSMSlowDownCnt.Size = new System.Drawing.Size(36, 21);
this.tbSMSlowDownCnt.TabIndex = 8;
this.tbSMSlowDownCnt.Text = "0.1";
//
// lvItems
//
this.lvItems.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
@@ -349,15 +725,6 @@
this.chNCCount.Text = "미체결량";
this.chNCCount.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
//
// tbLog
//
this.tbLog.Dock = System.Windows.Forms.DockStyle.Fill;
this.tbLog.Location = new System.Drawing.Point(0, 0);
this.tbLog.Name = "tbLog";
this.tbLog.Size = new System.Drawing.Size(804, 196);
this.tbLog.TabIndex = 0;
this.tbLog.Text = "";
//
// lvCurPrice
//
this.lvCurPrice.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
@@ -396,353 +763,6 @@
this.chBidCount.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.chBidCount.Width = 75;
//
// btUpdate
//
this.btUpdate.AutoSize = true;
this.btUpdate.Depth = 0;
this.btUpdate.Location = new System.Drawing.Point(74, 3);
this.btUpdate.MouseState = MaterialSkin.MouseState.HOVER;
this.btUpdate.Name = "btUpdate";
this.btUpdate.Primary = true;
this.btUpdate.Size = new System.Drawing.Size(68, 28);
this.btUpdate.TabIndex = 3;
this.btUpdate.Text = "Update";
this.btUpdate.UseVisualStyleBackColor = true;
this.btUpdate.Click += new System.EventHandler(this.btUpdate_Click);
//
// btCybos
//
this.btCybos.AutoSize = true;
this.btCybos.Depth = 0;
this.btCybos.Location = new System.Drawing.Point(3, 3);
this.btCybos.MouseState = MaterialSkin.MouseState.HOVER;
this.btCybos.Name = "btCybos";
this.btCybos.Primary = true;
this.btCybos.Size = new System.Drawing.Size(66, 28);
this.btCybos.TabIndex = 3;
this.btCybos.Text = "Cybos";
this.btCybos.UseVisualStyleBackColor = true;
this.btCybos.Click += new System.EventHandler(this.btCybos_Click);
//
// tabPage2
//
this.tabPage2.BackColor = System.Drawing.Color.White;
this.tabPage2.Controls.Add(this.materialLabel7);
this.tabPage2.Controls.Add(this.tbTrailingCnt);
this.tabPage2.Controls.Add(this.materialLabel6);
this.tabPage2.Controls.Add(this.tbTrailingP);
this.tabPage2.Controls.Add(this.materialLabel5);
this.tabPage2.Controls.Add(this.materialLabel4);
this.tabPage2.Controls.Add(this.materialLabel3);
this.tabPage2.Controls.Add(this.materialLabel2);
this.tabPage2.Controls.Add(this.tbBidCount);
this.tabPage2.Controls.Add(this.materialLabel1);
this.tabPage2.Controls.Add(this.btApply);
this.tabPage2.Controls.Add(this.tbSubAccount);
this.tabPage2.Controls.Add(this.cbAccount);
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(1060, 693);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Preference";
//
// materialLabel7
//
this.materialLabel7.AutoSize = true;
this.materialLabel7.Depth = 0;
this.materialLabel7.Font = new System.Drawing.Font("Roboto", 11F);
this.materialLabel7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.materialLabel7.Location = new System.Drawing.Point(224, 229);
this.materialLabel7.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel7.Name = "materialLabel7";
this.materialLabel7.Size = new System.Drawing.Size(20, 19);
this.materialLabel7.TabIndex = 12;
this.materialLabel7.Text = "회";
//
// tbTrailingCnt
//
this.tbTrailingCnt.Depth = 0;
this.tbTrailingCnt.Hint = "";
this.tbTrailingCnt.Location = new System.Drawing.Point(188, 225);
this.tbTrailingCnt.MouseState = MaterialSkin.MouseState.HOVER;
this.tbTrailingCnt.Name = "tbTrailingCnt";
this.tbTrailingCnt.PasswordChar = '\0';
this.tbTrailingCnt.SelectedText = "";
this.tbTrailingCnt.SelectionLength = 0;
this.tbTrailingCnt.SelectionStart = 0;
this.tbTrailingCnt.Size = new System.Drawing.Size(30, 23);
this.tbTrailingCnt.TabIndex = 11;
this.tbTrailingCnt.Text = "2";
this.tbTrailingCnt.UseSystemPasswordChar = false;
//
// materialLabel6
//
this.materialLabel6.AutoSize = true;
this.materialLabel6.Depth = 0;
this.materialLabel6.Font = new System.Drawing.Font("Roboto", 11F);
this.materialLabel6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.materialLabel6.Location = new System.Drawing.Point(152, 229);
this.materialLabel6.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel6.Name = "materialLabel6";
this.materialLabel6.Size = new System.Drawing.Size(20, 19);
this.materialLabel6.TabIndex = 10;
this.materialLabel6.Text = "%";
//
// tbTrailingP
//
this.tbTrailingP.Depth = 0;
this.tbTrailingP.Hint = "";
this.tbTrailingP.Location = new System.Drawing.Point(116, 225);
this.tbTrailingP.MouseState = MaterialSkin.MouseState.HOVER;
this.tbTrailingP.Name = "tbTrailingP";
this.tbTrailingP.PasswordChar = '\0';
this.tbTrailingP.SelectedText = "";
this.tbTrailingP.SelectionLength = 0;
this.tbTrailingP.SelectionStart = 0;
this.tbTrailingP.Size = new System.Drawing.Size(30, 23);
this.tbTrailingP.TabIndex = 9;
this.tbTrailingP.Text = "1.0";
this.tbTrailingP.UseSystemPasswordChar = false;
//
// materialLabel5
//
this.materialLabel5.AutoSize = true;
this.materialLabel5.Depth = 0;
this.materialLabel5.Font = new System.Drawing.Font("Roboto", 11F);
this.materialLabel5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.materialLabel5.Location = new System.Drawing.Point(25, 229);
this.materialLabel5.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel5.Name = "materialLabel5";
this.materialLabel5.Size = new System.Drawing.Size(68, 19);
this.materialLabel5.TabIndex = 8;
this.materialLabel5.Text = "최고가 대비";
//
// materialLabel4
//
this.materialLabel4.AutoSize = true;
this.materialLabel4.Depth = 0;
this.materialLabel4.Font = new System.Drawing.Font("Roboto", 11F);
this.materialLabel4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.materialLabel4.Location = new System.Drawing.Point(25, 144);
this.materialLabel4.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel4.Name = "materialLabel4";
this.materialLabel4.Size = new System.Drawing.Size(57, 19);
this.materialLabel4.TabIndex = 7;
this.materialLabel4.Text = "조건 횟수";
//
// materialLabel3
//
this.materialLabel3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.materialLabel3.AutoSize = true;
this.materialLabel3.Depth = 0;
this.materialLabel3.Font = new System.Drawing.Font("Roboto", 11F);
this.materialLabel3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.materialLabel3.Location = new System.Drawing.Point(6, 671);
this.materialLabel3.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel3.Name = "materialLabel3";
this.materialLabel3.Size = new System.Drawing.Size(165, 19);
this.materialLabel3.TabIndex = 6;
this.materialLabel3.Text = "Version : 2017.02.17.04";
//
// materialLabel2
//
this.materialLabel2.AutoSize = true;
this.materialLabel2.Depth = 0;
this.materialLabel2.Font = new System.Drawing.Font("Roboto", 11F);
this.materialLabel2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.materialLabel2.Location = new System.Drawing.Point(152, 148);
this.materialLabel2.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel2.Name = "materialLabel2";
this.materialLabel2.Size = new System.Drawing.Size(20, 19);
this.materialLabel2.TabIndex = 5;
this.materialLabel2.Text = "회";
//
// tbBidCount
//
this.tbBidCount.Depth = 0;
this.tbBidCount.Hint = "";
this.tbBidCount.Location = new System.Drawing.Point(116, 144);
this.tbBidCount.MouseState = MaterialSkin.MouseState.HOVER;
this.tbBidCount.Name = "tbBidCount";
this.tbBidCount.PasswordChar = '\0';
this.tbBidCount.SelectedText = "";
this.tbBidCount.SelectionLength = 0;
this.tbBidCount.SelectionStart = 0;
this.tbBidCount.Size = new System.Drawing.Size(30, 23);
this.tbBidCount.TabIndex = 4;
this.tbBidCount.Text = "5";
this.tbBidCount.UseSystemPasswordChar = false;
//
// materialLabel1
//
this.materialLabel1.AutoSize = true;
this.materialLabel1.Depth = 0;
this.materialLabel1.Font = new System.Drawing.Font("Roboto", 11F);
this.materialLabel1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.materialLabel1.Location = new System.Drawing.Point(25, 29);
this.materialLabel1.MouseState = MaterialSkin.MouseState.HOVER;
this.materialLabel1.Name = "materialLabel1";
this.materialLabel1.Size = new System.Drawing.Size(65, 19);
this.materialLabel1.TabIndex = 3;
this.materialLabel1.Text = "Account";
//
// btApply
//
this.btApply.AutoSize = true;
this.btApply.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.btApply.Depth = 0;
this.btApply.Location = new System.Drawing.Point(844, 483);
this.btApply.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
this.btApply.MinimumSize = new System.Drawing.Size(120, 36);
this.btApply.MouseState = MaterialSkin.MouseState.HOVER;
this.btApply.Name = "btApply";
this.btApply.Primary = false;
this.btApply.Size = new System.Drawing.Size(120, 36);
this.btApply.TabIndex = 2;
this.btApply.Text = "적용하기";
this.btApply.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btApply.UseVisualStyleBackColor = true;
this.btApply.Click += new System.EventHandler(this.btApply_Click);
//
// tbSubAccount
//
this.tbSubAccount.Depth = 0;
this.tbSubAccount.Hint = "";
this.tbSubAccount.Location = new System.Drawing.Point(154, 62);
this.tbSubAccount.MouseState = MaterialSkin.MouseState.HOVER;
this.tbSubAccount.Name = "tbSubAccount";
this.tbSubAccount.PasswordChar = '\0';
this.tbSubAccount.SelectedText = "";
this.tbSubAccount.SelectionLength = 0;
this.tbSubAccount.SelectionStart = 0;
this.tbSubAccount.Size = new System.Drawing.Size(25, 23);
this.tbSubAccount.TabIndex = 1;
this.tbSubAccount.Text = "10";
this.tbSubAccount.UseSystemPasswordChar = false;
//
// cbAccount
//
this.cbAccount.FormattingEnabled = true;
this.cbAccount.Location = new System.Drawing.Point(25, 62);
this.cbAccount.Name = "cbAccount";
this.cbAccount.Size = new System.Drawing.Size(121, 20);
this.cbAccount.TabIndex = 0;
//
// tabPage3
//
this.tabPage3.Controls.Add(this.cbSMMethod);
this.tabPage3.Controls.Add(this.tbSMListSize);
this.tabPage3.Controls.Add(this.tbSMSlowCnt);
this.tabPage3.Controls.Add(this.tbSMSlowSD);
this.tabPage3.Controls.Add(this.tbSMFastCnt);
this.tabPage3.Controls.Add(this.tbSMFastSD);
this.tabPage3.Controls.Add(this.tbSimulationLog);
this.tabPage3.Controls.Add(this.btSimulate);
this.tabPage3.Controls.Add(this.btLoad);
this.tabPage3.Location = new System.Drawing.Point(4, 22);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
this.tabPage3.Size = new System.Drawing.Size(1060, 693);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "Simulation";
this.tabPage3.UseVisualStyleBackColor = true;
//
// cbSMMethod
//
this.cbSMMethod.FormattingEnabled = true;
this.cbSMMethod.Items.AddRange(new object[] {
"마지막 비교",
"평균 비교"});
this.cbSMMethod.Location = new System.Drawing.Point(477, 24);
this.cbSMMethod.Name = "cbSMMethod";
this.cbSMMethod.Size = new System.Drawing.Size(121, 20);
this.cbSMMethod.TabIndex = 8;
this.cbSMMethod.Text = "마지막 비교";
//
// tbSMListSize
//
this.tbSMListSize.Location = new System.Drawing.Point(333, 20);
this.tbSMListSize.Name = "tbSMListSize";
this.tbSMListSize.Size = new System.Drawing.Size(36, 21);
this.tbSMListSize.TabIndex = 3;
this.tbSMListSize.Text = "20";
//
// tbSMSlowCnt
//
this.tbSMSlowCnt.Location = new System.Drawing.Point(375, 74);
this.tbSMSlowCnt.Name = "tbSMSlowCnt";
this.tbSMSlowCnt.Size = new System.Drawing.Size(36, 21);
this.tbSMSlowCnt.TabIndex = 7;
this.tbSMSlowCnt.Text = "1";
//
// tbSMSlowSD
//
this.tbSMSlowSD.Location = new System.Drawing.Point(333, 74);
this.tbSMSlowSD.Name = "tbSMSlowSD";
this.tbSMSlowSD.Size = new System.Drawing.Size(36, 21);
this.tbSMSlowSD.TabIndex = 6;
this.tbSMSlowSD.Text = "0.2";
//
// tbSMFastCnt
//
this.tbSMFastCnt.Location = new System.Drawing.Point(375, 47);
this.tbSMFastCnt.Name = "tbSMFastCnt";
this.tbSMFastCnt.Size = new System.Drawing.Size(36, 21);
this.tbSMFastCnt.TabIndex = 5;
this.tbSMFastCnt.Text = "3";
//
// tbSMFastSD
//
this.tbSMFastSD.Location = new System.Drawing.Point(333, 47);
this.tbSMFastSD.Name = "tbSMFastSD";
this.tbSMFastSD.Size = new System.Drawing.Size(36, 21);
this.tbSMFastSD.TabIndex = 4;
this.tbSMFastSD.Text = "0.75";
//
// tbSimulationLog
//
this.tbSimulationLog.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tbSimulationLog.Location = new System.Drawing.Point(0, 204);
this.tbSimulationLog.Name = "tbSimulationLog";
this.tbSimulationLog.Size = new System.Drawing.Size(1060, 489);
this.tbSimulationLog.TabIndex = 2;
this.tbSimulationLog.Text = "";
//
// btSimulate
//
this.btSimulate.AutoSize = true;
this.btSimulate.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.btSimulate.Depth = 0;
this.btSimulate.Location = new System.Drawing.Point(44, 95);
this.btSimulate.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
this.btSimulate.MouseState = MaterialSkin.MouseState.HOVER;
this.btSimulate.Name = "btSimulate";
this.btSimulate.Primary = false;
this.btSimulate.Size = new System.Drawing.Size(139, 36);
this.btSimulate.TabIndex = 1;
this.btSimulate.Text = "simulation start";
this.btSimulate.UseVisualStyleBackColor = true;
this.btSimulate.Click += new System.EventHandler(this.btSimulate_Click);
//
// btLoad
//
this.btLoad.AutoSize = true;
this.btLoad.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.btLoad.Depth = 0;
this.btLoad.Location = new System.Drawing.Point(44, 47);
this.btLoad.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
this.btLoad.MouseState = MaterialSkin.MouseState.HOVER;
this.btLoad.Name = "btLoad";
this.btLoad.Primary = false;
this.btLoad.Size = new System.Drawing.Size(86, 36);
this.btLoad.TabIndex = 0;
this.btLoad.Text = "Load data";
this.btLoad.UseVisualStyleBackColor = true;
this.btLoad.Click += new System.EventHandler(this.btLoad_Click);
//
// AutoSeller
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
@@ -829,10 +849,12 @@
private System.Windows.Forms.ColumnHeader chNCCount;
private System.Windows.Forms.ColumnHeader chNCPrice;
public System.Windows.Forms.TextBox tbSMSlowSD;
public System.Windows.Forms.TextBox tbSMFastCnt;
public System.Windows.Forms.TextBox tbSMFastUpCnt;
public System.Windows.Forms.TextBox tbSMFastSD;
public System.Windows.Forms.TextBox tbSMSlowCnt;
public System.Windows.Forms.TextBox tbSMSlowUpCnt;
public System.Windows.Forms.TextBox tbSMListSize;
public System.Windows.Forms.ComboBox cbSMMethod;
public System.Windows.Forms.TextBox tbSMSlowDownCnt;
public System.Windows.Forms.TextBox tbSMFastDownCnt;
}
}

View File

@@ -49,6 +49,8 @@ namespace AutoSellerNS
public AutoSeller()
{
InitializeComponent();
cbSMMethod.SelectedIndex = 0;
Util.SetLogView(tbLog);
Config.Init();

View File

@@ -132,7 +132,7 @@ namespace AutoSellerNS
DateTime StartDT;
DateTime.TryParse(strDate+" "+strSimulationTime, out StartDT);
string strOutFileName = Util.GetSimulationPath() + "/" + StartDT.ToString("yyyy-MM-dd") + "-" + strCodeName + "StockChart" + ".xlsx";
string strOutFileName = Util.GetSimulationPath() + "/" + StartDT.ToString("yyyy-MM-dd") + "-StockChart-" + strCodeName + ".xlsx";
if(File.Exists(strOutFileName) == true)
{
if(StartDT.DayOfYear == DateTime.Now.DayOfYear)
@@ -218,7 +218,7 @@ namespace AutoSellerNS
DateTime StartDT;
DateTime.TryParse(strDate+" "+strSimulationTime, out StartDT);
string strOutFileName = Util.GetSimulationPath() + "/" + StartDT.ToString("yyyy-MM-dd") + "-" + strCodeName + "StockChart" + ".xlsx";
string strOutFileName = Util.GetSimulationPath() + "/" + StartDT.ToString("yyyy-MM-dd") + "-JpBid-" + strCodeName + ".xlsx";
if(File.Exists(strOutFileName) == true)
{
if(StartDT.DayOfYear == DateTime.Now.DayOfYear)
@@ -300,7 +300,7 @@ namespace AutoSellerNS
int iStartPrice;
int.TryParse(strStartPrice, NumberStyles.AllowThousands, CultureInfo.CurrentCulture, out iStartPrice);
string strFileName = Util.GetSimulationPath() + "/" + StartDT.ToString("yyyy-MM-dd") + "-JpBid-" + strCodeName + ".xlsx";
string strFileName = Util.GetSimulationPath() + "/" + StartDT.ToString("yyyy-MM-dd") + "-StockChart-" + strCodeName + ".xlsx";
FileInfo newFile = new FileInfo(strFileName);
@@ -405,29 +405,35 @@ namespace AutoSellerNS
{
int iListCnt;
double dFastSD;
int iFastCnt;
double dFastUpCnt;
double dFastDownCnt;
double dSlowSD;
int iSlowCnt;
double dSlowUpCnt;
double dSlowDownCnt;
int.TryParse(m_AutoSeller.tbSMListSize.Text, out iListCnt);
double.TryParse(m_AutoSeller.tbSMFastSD.Text, out dFastSD);
int.TryParse(m_AutoSeller.tbSMFastCnt.Text, out iFastCnt);
double.TryParse(m_AutoSeller.tbSMFastUpCnt.Text, out dFastUpCnt);
double.TryParse(m_AutoSeller.tbSMFastDownCnt.Text, out dFastDownCnt);
double.TryParse(m_AutoSeller.tbSMSlowSD.Text, out dSlowSD);
int.TryParse(m_AutoSeller.tbSMSlowCnt.Text, out iSlowCnt);
double.TryParse(m_AutoSeller.tbSMSlowUpCnt.Text, out dSlowUpCnt);
double.TryParse(m_AutoSeller.tbSMSlowDownCnt.Text, out dSlowDownCnt);
bool bAverageCompare;
if(m_AutoSeller.cbSMMethod.SelectedText == "평균 비교")
if((string)m_AutoSeller.cbSMMethod.SelectedItem == "평균 비교")
bAverageCompare = true;
else
bAverageCompare = false;
m_tbLogView.AppendText(string.Format("[시뮬레이션 시작] 조건 : {0}회, 트레일링 : {1}%, {2}회\n \t\t리스트 크기:{3}, Fast : {4}, {5}, Slow : {6}, {7}, 비교 방식 : {8}\n",
Config.GetBidCount(), Config.GetTrailingRate(), Config.GetTrailingCnt(),
iListCnt, dFastSD, iFastCnt, dSlowSD, iSlowCnt, m_AutoSeller.cbSMMethod.SelectedItem
iListCnt, dFastSD, dFastUpCnt, dSlowSD, dSlowUpCnt, m_AutoSeller.cbSMMethod.SelectedItem
));
int iTotalProfit = 0;
int iTotalBid = 0;
DateTime PrevDT;
DateTime.TryParse("0000-00-00 00:00:00", out PrevDT);
foreach(string strLine in File.ReadLines(Util.GetSimulationPath()+"/0-input.txt", Encoding.UTF8))
{
@@ -444,11 +450,25 @@ namespace AutoSellerNS
DateTime StartDT;
DateTime.TryParse(strDate+" "+strSimulationTime, out StartDT);
if(iTotalBid > 0 && StartDT.DayOfYear != PrevDT.DayOfYear)
{
m_tbLogView.AppendText(string.Format("[시뮬레이션 종료] 총수익 : {0:n0}원 : {1:n2}%\n\n", iTotalProfit, iTotalProfit*100/(float)1000000));
iTotalProfit = 0;
iTotalBid = 0;
}
if(iTotalBid == 0)
{
m_tbLogView.AppendText(string.Format("{0}\n", StartDT.ToString("yyyy-MM-dd")));
}
int iStartPrice;
int.TryParse(strStartPrice, NumberStyles.AllowThousands, CultureInfo.CurrentCulture, out iStartPrice);
string strFileName = Util.GetSimulationPath() + "/" + StartDT.ToString("yyyy-MM-dd") + "-JpBid-" + strCodeName + ".xlsx";
if(File.Exists(strFileName) == false)
continue;
FileInfo newFile = new FileInfo(strFileName);
ExcelPackage package = new ExcelPackage(newFile);
@@ -472,14 +492,14 @@ namespace AutoSellerNS
bool bPrevAsk = false;
int iMaxAskPrice = 0;
int iCheckCount = 50;
double dCheckCount = 5.0;
List<int> m_PriceList = new List<int>();
int iPrevAskPrice = 0;
for(int iRow = 2; iRow<=iMaxRow; iRow++)
{
if(Sheet.Cells[iRow, 2].Value == "*")
if((string)Sheet.Cells[iRow, 2].Value == "*")
continue;
int iTime = (int)(double)Sheet.Cells[iRow, 1].Value;
@@ -519,16 +539,16 @@ namespace AutoSellerNS
if(bAverageCompare == true)
{
if(iPrice >= dAverage)
iCheckCount += iFastCnt;
else if(iCheckCount > 30)
iCheckCount -= iFastCnt;
dCheckCount += dFastUpCnt;
else// if(dCheckCount > 3)
dCheckCount -= dFastDownCnt;
}
else
{
if(iPrice >= m_PriceList[m_PriceList.Count-2])
iCheckCount += iFastCnt;
else if(iCheckCount > 30)
iCheckCount -= iFastCnt;
dCheckCount += dFastUpCnt;
else// if(dCheckCount > 3)
dCheckCount -= dFastDownCnt;
}
}
@@ -537,19 +557,19 @@ namespace AutoSellerNS
if(bAverageCompare == true)
{
if(iPrice >= dAverage)
iCheckCount += iSlowCnt;
else if(iCheckCount > 30)
iCheckCount -= iSlowCnt;
dCheckCount += dSlowUpCnt;
else// if(dCheckCount > 3)
dCheckCount -= dSlowDownCnt;
}
else
{
if(iPrice >= m_PriceList[m_PriceList.Count-2])
iCheckCount += iSlowCnt;
else if(iCheckCount > 30)
iCheckCount -= iSlowCnt;
dCheckCount += dSlowUpCnt;
else// if(dCheckCount > 3)
dCheckCount -= dSlowUpCnt;
}
}
//dCheckCount = Math.Min(Math.Max(dCheckCount, 0), 15);
//// 체결가 비교
//if(iPrice > iPrevPrice)
@@ -623,7 +643,7 @@ namespace AutoSellerNS
//else
// iDealCountInSec = 1;
if(iAskCount >= Math.Round(iCheckCount/10.0f))
if(iAskCount >= Math.Round(dCheckCount))
{
int iSellPrice = iPrice - m_CybosHelper.GetUnitValue(iPrice);
m_tbLogView.AppendText(string.Format("[{0}] 조건1 매도 (매수 : {1:n0}원, {2}, line:{3}) (매도 : {4:n0}원(매도가:{5:n0}원) {6} line:{7}) ({8}, {9:n0} : {10:n2}%) {11} \n",
@@ -642,7 +662,7 @@ namespace AutoSellerNS
(iSellPrice-iStartPrice)*iStockCount,
(iSellPrice-iStartPrice)*100/(float)iStartPrice,
iCheckCount
dCheckCount
));
iTotalProfit += (iSellPrice-iStartPrice)*iStockCount;
iTotalBid += iStartPrice*iStockCount;
@@ -693,7 +713,7 @@ namespace AutoSellerNS
(iSellPrice-iStartPrice)*iStockCount,
(iSellPrice-iStartPrice)*100/(float)iStartPrice,
iCheckCount
dCheckCount
));
@@ -708,6 +728,8 @@ namespace AutoSellerNS
aPrevDT.Add(RowDT);
if(aPrevDT.Count > 15)
aPrevDT.RemoveAt(0);
PrevDT = StartDT;
}
}