From 656894a6cf6bc168499bb9f02b6449cacdab3949 Mon Sep 17 00:00:00 2001 From: mjjo Date: Mon, 27 Mar 2017 10:46:57 +0900 Subject: [PATCH] =?UTF-8?q?=EB=BB=97=EB=8A=94=20=EB=B6=80=EB=B6=84=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AutoSeller.Designer.cs | 1555 ++++++++++++++++++++-------------------- AutoSeller.cs | 80 +-- CybosHelper.cs | 97 ++- SimulationHelper.cs | 93 ++- Util.cs | 3 + 5 files changed, 967 insertions(+), 861 deletions(-) diff --git a/AutoSeller.Designer.cs b/AutoSeller.Designer.cs index c8ef5a2..7152ec9 100644 --- a/AutoSeller.Designer.cs +++ b/AutoSeller.Designer.cs @@ -36,7 +36,32 @@ 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.chCheckCountLimit = ((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.chNCOrgOrderNo = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + 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(); @@ -75,12 +100,14 @@ this.tbSubAccount = new MaterialSkin.Controls.MaterialSingleLineTextField(); this.cbAccount = new System.Windows.Forms.ComboBox(); this.tabPage3 = new System.Windows.Forms.TabPage(); + this.chSMHalfTrailing = new MaterialSkin.Controls.MaterialCheckBox(); this.tbSMSlowDownCnt = new System.Windows.Forms.TextBox(); this.tbSMFastDownCnt = new System.Windows.Forms.TextBox(); this.cbSMMethod = new System.Windows.Forms.ComboBox(); this.tbSMListSize = new System.Windows.Forms.TextBox(); this.tbSMSlowUpCnt = new System.Windows.Forms.TextBox(); this.tbSMTimeDiffLimit = new System.Windows.Forms.TextBox(); + this.tbSMIgnorePrice = new System.Windows.Forms.TextBox(); this.tbSMTimeSub = new System.Windows.Forms.TextBox(); this.tbSMSlowSD = new System.Windows.Forms.TextBox(); this.tbSMFastUpCnt = new System.Windows.Forms.TextBox(); @@ -88,31 +115,6 @@ this.tbSimulationLog = new System.Windows.Forms.RichTextBox(); this.btSimulate = new MaterialSkin.Controls.MaterialFlatButton(); this.btLoad = new MaterialSkin.Controls.MaterialFlatButton(); - this.tbSMIgnorePrice = 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.chCheckCountLimit = ((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(); @@ -157,7 +159,7 @@ this.materialTabControl1.MouseState = MaterialSkin.MouseState.HOVER; this.materialTabControl1.Name = "materialTabControl1"; this.materialTabControl1.SelectedIndex = 0; - this.materialTabControl1.Size = new System.Drawing.Size(1141, 719); + this.materialTabControl1.Size = new System.Drawing.Size(1141, 662); this.materialTabControl1.TabIndex = 2; // // tabPage1 @@ -169,7 +171,7 @@ this.tabPage1.Location = new System.Drawing.Point(4, 22); this.tabPage1.Name = "tabPage1"; this.tabPage1.Padding = new System.Windows.Forms.Padding(3); - this.tabPage1.Size = new System.Drawing.Size(1133, 693); + this.tabPage1.Size = new System.Drawing.Size(1133, 636); this.tabPage1.TabIndex = 0; this.tabPage1.Text = "Items"; this.tabPage1.UseVisualStyleBackColor = true; @@ -204,7 +206,7 @@ // splitContainer2.Panel2 // this.splitContainer2.Panel2.Controls.Add(this.lvCurPrice); - this.splitContainer2.Size = new System.Drawing.Size(1127, 655); + this.splitContainer2.Size = new System.Drawing.Size(1127, 598); this.splitContainer2.SplitterDistance = 859; this.splitContainer2.TabIndex = 2; this.splitContainer2.SizeChanged += new System.EventHandler(this.splitContainer2_SizeChanged); @@ -223,8 +225,8 @@ // splitContainer1.Panel2 // this.splitContainer1.Panel2.Controls.Add(this.tbLog); - this.splitContainer1.Size = new System.Drawing.Size(859, 655); - this.splitContainer1.SplitterDistance = 455; + this.splitContainer1.Size = new System.Drawing.Size(859, 598); + this.splitContainer1.SplitterDistance = 415; this.splitContainer1.TabIndex = 1; // // splitContainer3 @@ -241,737 +243,10 @@ // splitContainer3.Panel2 // this.splitContainer3.Panel2.Controls.Add(this.lvNCItem); - this.splitContainer3.Size = new System.Drawing.Size(859, 455); - this.splitContainer3.SplitterDistance = 300; + this.splitContainer3.Size = new System.Drawing.Size(859, 415); + this.splitContainer3.SplitterDistance = 273; 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(859, 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.materialLabel18); - this.tabPage2.Controls.Add(this.tbCFIgnorePrice); - this.tabPage2.Controls.Add(this.materialLabel17); - this.tabPage2.Controls.Add(this.materialLabel14); - this.tabPage2.Controls.Add(this.materialLabel13); - this.tabPage2.Controls.Add(this.tbCFSlowDown); - this.tabPage2.Controls.Add(this.tbCFSlowUp); - this.tabPage2.Controls.Add(this.tbCFSlowSD); - this.tabPage2.Controls.Add(this.materialLabel15); - this.tabPage2.Controls.Add(this.materialLabel11); - this.tabPage2.Controls.Add(this.materialLabel8); - this.tabPage2.Controls.Add(this.tbCFFastDown); - this.tabPage2.Controls.Add(this.tbCFFastUp); - this.tabPage2.Controls.Add(this.tbCFFastSD); - this.tabPage2.Controls.Add(this.materialLabel12); - this.tabPage2.Controls.Add(this.tbCFTimeLimit); - this.tabPage2.Controls.Add(this.tbCFTimeDown); - this.tabPage2.Controls.Add(this.tbCFListSize); - this.tabPage2.Controls.Add(this.materialLabel16); - this.tabPage2.Controls.Add(this.materialLabel9); - this.tabPage2.Controls.Add(this.materialLabel10); - 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(1133, 693); - this.tabPage2.TabIndex = 1; - this.tabPage2.Text = "Preference"; - // - // materialLabel18 - // - this.materialLabel18.AutoSize = true; - this.materialLabel18.Depth = 0; - this.materialLabel18.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F); - this.materialLabel18.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.materialLabel18.Location = new System.Drawing.Point(99, 455); - this.materialLabel18.MouseState = MaterialSkin.MouseState.HOVER; - this.materialLabel18.Name = "materialLabel18"; - this.materialLabel18.Size = new System.Drawing.Size(111, 18); - this.materialLabel18.TabIndex = 37; - this.materialLabel18.Text = "원 이하 체결 무시"; - // - // tbCFIgnorePrice - // - this.tbCFIgnorePrice.Depth = 0; - this.tbCFIgnorePrice.Hint = ""; - this.tbCFIgnorePrice.Location = new System.Drawing.Point(30, 455); - this.tbCFIgnorePrice.MouseState = MaterialSkin.MouseState.HOVER; - this.tbCFIgnorePrice.Name = "tbCFIgnorePrice"; - this.tbCFIgnorePrice.PasswordChar = '\0'; - this.tbCFIgnorePrice.SelectedText = ""; - this.tbCFIgnorePrice.SelectionLength = 0; - this.tbCFIgnorePrice.SelectionStart = 0; - this.tbCFIgnorePrice.Size = new System.Drawing.Size(63, 23); - this.tbCFIgnorePrice.TabIndex = 36; - this.tbCFIgnorePrice.Text = "50000"; - this.tbCFIgnorePrice.UseSystemPasswordChar = false; - // - // materialLabel17 - // - this.materialLabel17.AutoSize = true; - this.materialLabel17.Depth = 0; - this.materialLabel17.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F); - this.materialLabel17.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.materialLabel17.Location = new System.Drawing.Point(187, 424); - this.materialLabel17.MouseState = MaterialSkin.MouseState.HOVER; - this.materialLabel17.Name = "materialLabel17"; - this.materialLabel17.Size = new System.Drawing.Size(107, 18); - this.materialLabel17.TabIndex = 35; - this.materialLabel17.Text = "초 이상이면 매도"; - // - // materialLabel14 - // - this.materialLabel14.AutoSize = true; - this.materialLabel14.Depth = 0; - this.materialLabel14.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F); - this.materialLabel14.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.materialLabel14.Location = new System.Drawing.Point(209, 389); - this.materialLabel14.MouseState = MaterialSkin.MouseState.HOVER; - this.materialLabel14.Name = "materialLabel14"; - this.materialLabel14.Size = new System.Drawing.Size(13, 18); - this.materialLabel14.TabIndex = 34; - this.materialLabel14.Text = "-"; - // - // materialLabel13 - // - this.materialLabel13.AutoSize = true; - this.materialLabel13.Depth = 0; - this.materialLabel13.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F); - this.materialLabel13.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.materialLabel13.Location = new System.Drawing.Point(143, 390); - this.materialLabel13.MouseState = MaterialSkin.MouseState.HOVER; - this.materialLabel13.Name = "materialLabel13"; - this.materialLabel13.Size = new System.Drawing.Size(17, 18); - this.materialLabel13.TabIndex = 34; - this.materialLabel13.Text = "+"; - // - // tbCFSlowDown - // - this.tbCFSlowDown.Depth = 0; - this.tbCFSlowDown.Hint = ""; - this.tbCFSlowDown.Location = new System.Drawing.Point(222, 390); - this.tbCFSlowDown.MouseState = MaterialSkin.MouseState.HOVER; - this.tbCFSlowDown.Name = "tbCFSlowDown"; - this.tbCFSlowDown.PasswordChar = '\0'; - this.tbCFSlowDown.SelectedText = ""; - this.tbCFSlowDown.SelectionLength = 0; - this.tbCFSlowDown.SelectionStart = 0; - this.tbCFSlowDown.Size = new System.Drawing.Size(37, 23); - this.tbCFSlowDown.TabIndex = 33; - this.tbCFSlowDown.Text = "0.4"; - this.tbCFSlowDown.UseSystemPasswordChar = false; - // - // tbCFSlowUp - // - this.tbCFSlowUp.Depth = 0; - this.tbCFSlowUp.Hint = ""; - this.tbCFSlowUp.Location = new System.Drawing.Point(162, 390); - this.tbCFSlowUp.MouseState = MaterialSkin.MouseState.HOVER; - this.tbCFSlowUp.Name = "tbCFSlowUp"; - this.tbCFSlowUp.PasswordChar = '\0'; - this.tbCFSlowUp.SelectedText = ""; - this.tbCFSlowUp.SelectionLength = 0; - this.tbCFSlowUp.SelectionStart = 0; - this.tbCFSlowUp.Size = new System.Drawing.Size(39, 23); - this.tbCFSlowUp.TabIndex = 33; - this.tbCFSlowUp.Text = "0.4"; - this.tbCFSlowUp.UseSystemPasswordChar = false; - // - // tbCFSlowSD - // - this.tbCFSlowSD.Depth = 0; - this.tbCFSlowSD.Hint = ""; - this.tbCFSlowSD.Location = new System.Drawing.Point(103, 390); - this.tbCFSlowSD.MouseState = MaterialSkin.MouseState.HOVER; - this.tbCFSlowSD.Name = "tbCFSlowSD"; - this.tbCFSlowSD.PasswordChar = '\0'; - this.tbCFSlowSD.SelectedText = ""; - this.tbCFSlowSD.SelectionLength = 0; - this.tbCFSlowSD.SelectionStart = 0; - this.tbCFSlowSD.Size = new System.Drawing.Size(30, 23); - this.tbCFSlowSD.TabIndex = 31; - this.tbCFSlowSD.Text = "0.2"; - this.tbCFSlowSD.UseSystemPasswordChar = false; - // - // materialLabel15 - // - this.materialLabel15.AutoSize = true; - this.materialLabel15.Depth = 0; - this.materialLabel15.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F); - this.materialLabel15.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.materialLabel15.Location = new System.Drawing.Point(25, 391); - this.materialLabel15.MouseState = MaterialSkin.MouseState.HOVER; - this.materialLabel15.Name = "materialLabel15"; - this.materialLabel15.Size = new System.Drawing.Size(64, 18); - this.materialLabel15.TabIndex = 30; - this.materialLabel15.Text = "저 변동성"; - // - // materialLabel11 - // - this.materialLabel11.AutoSize = true; - this.materialLabel11.Depth = 0; - this.materialLabel11.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F); - this.materialLabel11.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.materialLabel11.Location = new System.Drawing.Point(209, 355); - this.materialLabel11.MouseState = MaterialSkin.MouseState.HOVER; - this.materialLabel11.Name = "materialLabel11"; - this.materialLabel11.Size = new System.Drawing.Size(13, 18); - this.materialLabel11.TabIndex = 29; - this.materialLabel11.Text = "-"; - // - // materialLabel8 - // - this.materialLabel8.AutoSize = true; - this.materialLabel8.Depth = 0; - this.materialLabel8.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F); - this.materialLabel8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.materialLabel8.Location = new System.Drawing.Point(143, 355); - this.materialLabel8.MouseState = MaterialSkin.MouseState.HOVER; - this.materialLabel8.Name = "materialLabel8"; - this.materialLabel8.Size = new System.Drawing.Size(17, 18); - this.materialLabel8.TabIndex = 29; - this.materialLabel8.Text = "+"; - // - // tbCFFastDown - // - this.tbCFFastDown.Depth = 0; - this.tbCFFastDown.Hint = ""; - this.tbCFFastDown.Location = new System.Drawing.Point(222, 355); - this.tbCFFastDown.MouseState = MaterialSkin.MouseState.HOVER; - this.tbCFFastDown.Name = "tbCFFastDown"; - this.tbCFFastDown.PasswordChar = '\0'; - this.tbCFFastDown.SelectedText = ""; - this.tbCFFastDown.SelectionLength = 0; - this.tbCFFastDown.SelectionStart = 0; - this.tbCFFastDown.Size = new System.Drawing.Size(37, 23); - this.tbCFFastDown.TabIndex = 28; - this.tbCFFastDown.Text = "0.05"; - this.tbCFFastDown.UseSystemPasswordChar = false; - // - // tbCFFastUp - // - this.tbCFFastUp.Depth = 0; - this.tbCFFastUp.Hint = ""; - this.tbCFFastUp.Location = new System.Drawing.Point(162, 355); - this.tbCFFastUp.MouseState = MaterialSkin.MouseState.HOVER; - this.tbCFFastUp.Name = "tbCFFastUp"; - this.tbCFFastUp.PasswordChar = '\0'; - this.tbCFFastUp.SelectedText = ""; - this.tbCFFastUp.SelectionLength = 0; - this.tbCFFastUp.SelectionStart = 0; - this.tbCFFastUp.Size = new System.Drawing.Size(39, 23); - this.tbCFFastUp.TabIndex = 28; - this.tbCFFastUp.Text = "0.05"; - this.tbCFFastUp.UseSystemPasswordChar = false; - // - // tbCFFastSD - // - this.tbCFFastSD.Depth = 0; - this.tbCFFastSD.Hint = ""; - this.tbCFFastSD.Location = new System.Drawing.Point(103, 355); - this.tbCFFastSD.MouseState = MaterialSkin.MouseState.HOVER; - this.tbCFFastSD.Name = "tbCFFastSD"; - this.tbCFFastSD.PasswordChar = '\0'; - this.tbCFFastSD.SelectedText = ""; - this.tbCFFastSD.SelectionLength = 0; - this.tbCFFastSD.SelectionStart = 0; - this.tbCFFastSD.Size = new System.Drawing.Size(30, 23); - this.tbCFFastSD.TabIndex = 26; - this.tbCFFastSD.Text = "0.75"; - this.tbCFFastSD.UseSystemPasswordChar = false; - // - // materialLabel12 - // - this.materialLabel12.AutoSize = true; - this.materialLabel12.Depth = 0; - this.materialLabel12.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F); - this.materialLabel12.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.materialLabel12.Location = new System.Drawing.Point(25, 356); - this.materialLabel12.MouseState = MaterialSkin.MouseState.HOVER; - this.materialLabel12.Name = "materialLabel12"; - this.materialLabel12.Size = new System.Drawing.Size(64, 18); - this.materialLabel12.TabIndex = 25; - this.materialLabel12.Text = "고 변동성"; - // - // tbCFTimeLimit - // - this.tbCFTimeLimit.Depth = 0; - this.tbCFTimeLimit.Hint = ""; - this.tbCFTimeLimit.Location = new System.Drawing.Point(151, 424); - this.tbCFTimeLimit.MouseState = MaterialSkin.MouseState.HOVER; - this.tbCFTimeLimit.Name = "tbCFTimeLimit"; - this.tbCFTimeLimit.PasswordChar = '\0'; - this.tbCFTimeLimit.SelectedText = ""; - this.tbCFTimeLimit.SelectionLength = 0; - this.tbCFTimeLimit.SelectionStart = 0; - this.tbCFTimeLimit.Size = new System.Drawing.Size(30, 23); - this.tbCFTimeLimit.TabIndex = 23; - this.tbCFTimeLimit.Text = "5"; - this.tbCFTimeLimit.UseSystemPasswordChar = false; - // - // tbCFTimeDown - // - this.tbCFTimeDown.Depth = 0; - this.tbCFTimeDown.Hint = ""; - this.tbCFTimeDown.Location = new System.Drawing.Point(63, 424); - this.tbCFTimeDown.MouseState = MaterialSkin.MouseState.HOVER; - this.tbCFTimeDown.Name = "tbCFTimeDown"; - this.tbCFTimeDown.PasswordChar = '\0'; - this.tbCFTimeDown.SelectedText = ""; - this.tbCFTimeDown.SelectionLength = 0; - this.tbCFTimeDown.SelectionStart = 0; - this.tbCFTimeDown.Size = new System.Drawing.Size(30, 23); - this.tbCFTimeDown.TabIndex = 23; - this.tbCFTimeDown.Text = "0.02"; - this.tbCFTimeDown.UseSystemPasswordChar = false; - // - // tbCFListSize - // - this.tbCFListSize.Depth = 0; - this.tbCFListSize.Hint = ""; - this.tbCFListSize.Location = new System.Drawing.Point(88, 323); - this.tbCFListSize.MouseState = MaterialSkin.MouseState.HOVER; - this.tbCFListSize.Name = "tbCFListSize"; - this.tbCFListSize.PasswordChar = '\0'; - this.tbCFListSize.SelectedText = ""; - this.tbCFListSize.SelectionLength = 0; - this.tbCFListSize.SelectionStart = 0; - this.tbCFListSize.Size = new System.Drawing.Size(30, 23); - this.tbCFListSize.TabIndex = 23; - this.tbCFListSize.Text = "20"; - this.tbCFListSize.UseSystemPasswordChar = false; - // - // materialLabel16 - // - this.materialLabel16.AutoSize = true; - this.materialLabel16.Depth = 0; - this.materialLabel16.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F); - this.materialLabel16.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.materialLabel16.Location = new System.Drawing.Point(99, 424); - this.materialLabel16.MouseState = MaterialSkin.MouseState.HOVER; - this.materialLabel16.Name = "materialLabel16"; - this.materialLabel16.Size = new System.Drawing.Size(34, 18); - this.materialLabel16.TabIndex = 22; - this.materialLabel16.Text = "감소"; - // - // materialLabel9 - // - this.materialLabel9.AutoSize = true; - this.materialLabel9.Depth = 0; - this.materialLabel9.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F); - this.materialLabel9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.materialLabel9.Location = new System.Drawing.Point(26, 424); - this.materialLabel9.MouseState = MaterialSkin.MouseState.HOVER; - this.materialLabel9.Name = "materialLabel9"; - this.materialLabel9.Size = new System.Drawing.Size(34, 18); - this.materialLabel9.TabIndex = 22; - this.materialLabel9.Text = "초당"; - // - // materialLabel10 - // - this.materialLabel10.AutoSize = true; - this.materialLabel10.Depth = 0; - this.materialLabel10.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); - this.materialLabel10.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.materialLabel10.Location = new System.Drawing.Point(25, 322); - this.materialLabel10.MouseState = MaterialSkin.MouseState.HOVER; - this.materialLabel10.Name = "materialLabel10"; - this.materialLabel10.Size = new System.Drawing.Size(49, 20); - this.materialLabel10.TabIndex = 22; - this.materialLabel10.Text = "체결 수"; - // - // 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.03.20.11"; - // - // 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.tbSMTimeDiffLimit); - this.tabPage3.Controls.Add(this.tbSMIgnorePrice); - this.tabPage3.Controls.Add(this.tbSMTimeSub); - 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(1133, 693); - this.tabPage3.TabIndex = 2; - this.tabPage3.Text = "Simulation"; - this.tabPage3.UseVisualStyleBackColor = true; - // - // 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.4"; - // - // 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.05"; - // - // 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.4"; - // - // tbSMTimeDiffLimit - // - this.tbSMTimeDiffLimit.Location = new System.Drawing.Point(375, 101); - this.tbSMTimeDiffLimit.Name = "tbSMTimeDiffLimit"; - this.tbSMTimeDiffLimit.Size = new System.Drawing.Size(36, 21); - this.tbSMTimeDiffLimit.TabIndex = 6; - this.tbSMTimeDiffLimit.Text = "5"; - // - // tbSMTimeSub - // - this.tbSMTimeSub.Location = new System.Drawing.Point(333, 101); - this.tbSMTimeSub.Name = "tbSMTimeSub"; - this.tbSMTimeSub.Size = new System.Drawing.Size(36, 21); - this.tbSMTimeSub.TabIndex = 6; - this.tbSMTimeSub.Text = "0.02"; - // - // 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.05"; - // - // 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.HideSelection = false; - this.tbSimulationLog.Location = new System.Drawing.Point(0, 204); - this.tbSimulationLog.Name = "tbSimulationLog"; - this.tbSimulationLog.Size = new System.Drawing.Size(1133, 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); - // - // tbSMIgnorePrice - // - this.tbSMIgnorePrice.Location = new System.Drawing.Point(333, 128); - this.tbSMIgnorePrice.Name = "tbSMIgnorePrice"; - this.tbSMIgnorePrice.Size = new System.Drawing.Size(59, 21); - this.tbSMIgnorePrice.TabIndex = 6; - this.tbSMIgnorePrice.Text = "50000"; - // // lvItems // this.lvItems.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { @@ -992,7 +267,7 @@ this.lvItems.GridLines = true; this.lvItems.Location = new System.Drawing.Point(0, 0); this.lvItems.Name = "lvItems"; - this.lvItems.Size = new System.Drawing.Size(859, 300); + this.lvItems.Size = new System.Drawing.Size(859, 273); this.lvItems.TabIndex = 0; this.lvItems.UseCompatibleStateImageBehavior = false; this.lvItems.View = System.Windows.Forms.View.Details; @@ -1066,6 +341,7 @@ // lvNCItem // this.lvNCItem.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.chNCOrgOrderNo, this.chNCCode, this.chNCCodeName, this.chNCType, @@ -1076,11 +352,16 @@ this.lvNCItem.GridLines = true; this.lvNCItem.Location = new System.Drawing.Point(0, 0); this.lvNCItem.Name = "lvNCItem"; - this.lvNCItem.Size = new System.Drawing.Size(859, 151); + this.lvNCItem.Size = new System.Drawing.Size(859, 138); this.lvNCItem.TabIndex = 1; this.lvNCItem.UseCompatibleStateImageBehavior = false; this.lvNCItem.View = System.Windows.Forms.View.Details; // + // chNCOrgOrderNo + // + this.chNCOrgOrderNo.Text = "원주문번호"; + this.chNCOrgOrderNo.Width = 91; + // // chNCCode // this.chNCCode.Text = "코드"; @@ -1089,7 +370,7 @@ // chNCCodeName // this.chNCCodeName.Text = "종목명"; - this.chNCCodeName.Width = 86; + this.chNCCodeName.Width = 101; // // chNCType // @@ -1108,6 +389,15 @@ 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(859, 179); + this.tbLog.TabIndex = 0; + this.tbLog.Text = ""; + // // lvCurPrice // this.lvCurPrice.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { @@ -1120,7 +410,7 @@ this.lvCurPrice.GridLines = true; this.lvCurPrice.Location = new System.Drawing.Point(0, 0); this.lvCurPrice.Name = "lvCurPrice"; - this.lvCurPrice.Size = new System.Drawing.Size(264, 655); + this.lvCurPrice.Size = new System.Drawing.Size(264, 598); this.lvCurPrice.TabIndex = 0; this.lvCurPrice.UseCompatibleStateImageBehavior = false; this.lvCurPrice.View = System.Windows.Forms.View.Details; @@ -1146,11 +436,746 @@ 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.materialLabel18); + this.tabPage2.Controls.Add(this.tbCFIgnorePrice); + this.tabPage2.Controls.Add(this.materialLabel17); + this.tabPage2.Controls.Add(this.materialLabel14); + this.tabPage2.Controls.Add(this.materialLabel13); + this.tabPage2.Controls.Add(this.tbCFSlowDown); + this.tabPage2.Controls.Add(this.tbCFSlowUp); + this.tabPage2.Controls.Add(this.tbCFSlowSD); + this.tabPage2.Controls.Add(this.materialLabel15); + this.tabPage2.Controls.Add(this.materialLabel11); + this.tabPage2.Controls.Add(this.materialLabel8); + this.tabPage2.Controls.Add(this.tbCFFastDown); + this.tabPage2.Controls.Add(this.tbCFFastUp); + this.tabPage2.Controls.Add(this.tbCFFastSD); + this.tabPage2.Controls.Add(this.materialLabel12); + this.tabPage2.Controls.Add(this.tbCFTimeLimit); + this.tabPage2.Controls.Add(this.tbCFTimeDown); + this.tabPage2.Controls.Add(this.tbCFListSize); + this.tabPage2.Controls.Add(this.materialLabel16); + this.tabPage2.Controls.Add(this.materialLabel9); + this.tabPage2.Controls.Add(this.materialLabel10); + 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(1133, 636); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "Preference"; + // + // materialLabel18 + // + this.materialLabel18.AutoSize = true; + this.materialLabel18.Depth = 0; + this.materialLabel18.Font = new System.Drawing.Font("Roboto", 11F); + this.materialLabel18.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.materialLabel18.Location = new System.Drawing.Point(99, 455); + this.materialLabel18.MouseState = MaterialSkin.MouseState.HOVER; + this.materialLabel18.Name = "materialLabel18"; + this.materialLabel18.Size = new System.Drawing.Size(98, 19); + this.materialLabel18.TabIndex = 37; + this.materialLabel18.Text = "원 이하 체결 무시"; + // + // tbCFIgnorePrice + // + this.tbCFIgnorePrice.Depth = 0; + this.tbCFIgnorePrice.Hint = ""; + this.tbCFIgnorePrice.Location = new System.Drawing.Point(30, 455); + this.tbCFIgnorePrice.MouseState = MaterialSkin.MouseState.HOVER; + this.tbCFIgnorePrice.Name = "tbCFIgnorePrice"; + this.tbCFIgnorePrice.PasswordChar = '\0'; + this.tbCFIgnorePrice.SelectedText = ""; + this.tbCFIgnorePrice.SelectionLength = 0; + this.tbCFIgnorePrice.SelectionStart = 0; + this.tbCFIgnorePrice.Size = new System.Drawing.Size(63, 23); + this.tbCFIgnorePrice.TabIndex = 36; + this.tbCFIgnorePrice.Text = "50000"; + this.tbCFIgnorePrice.UseSystemPasswordChar = false; + // + // materialLabel17 + // + this.materialLabel17.AutoSize = true; + this.materialLabel17.Depth = 0; + this.materialLabel17.Font = new System.Drawing.Font("Roboto", 11F); + this.materialLabel17.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.materialLabel17.Location = new System.Drawing.Point(187, 424); + this.materialLabel17.MouseState = MaterialSkin.MouseState.HOVER; + this.materialLabel17.Name = "materialLabel17"; + this.materialLabel17.Size = new System.Drawing.Size(94, 19); + this.materialLabel17.TabIndex = 35; + this.materialLabel17.Text = "초 이상이면 매도"; + // + // materialLabel14 + // + this.materialLabel14.AutoSize = true; + this.materialLabel14.Depth = 0; + this.materialLabel14.Font = new System.Drawing.Font("Roboto", 11F); + this.materialLabel14.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.materialLabel14.Location = new System.Drawing.Point(209, 389); + this.materialLabel14.MouseState = MaterialSkin.MouseState.HOVER; + this.materialLabel14.Name = "materialLabel14"; + this.materialLabel14.Size = new System.Drawing.Size(13, 19); + this.materialLabel14.TabIndex = 34; + this.materialLabel14.Text = "-"; + // + // materialLabel13 + // + this.materialLabel13.AutoSize = true; + this.materialLabel13.Depth = 0; + this.materialLabel13.Font = new System.Drawing.Font("Roboto", 11F); + this.materialLabel13.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.materialLabel13.Location = new System.Drawing.Point(143, 390); + this.materialLabel13.MouseState = MaterialSkin.MouseState.HOVER; + this.materialLabel13.Name = "materialLabel13"; + this.materialLabel13.Size = new System.Drawing.Size(18, 19); + this.materialLabel13.TabIndex = 34; + this.materialLabel13.Text = "+"; + // + // tbCFSlowDown + // + this.tbCFSlowDown.Depth = 0; + this.tbCFSlowDown.Hint = ""; + this.tbCFSlowDown.Location = new System.Drawing.Point(222, 390); + this.tbCFSlowDown.MouseState = MaterialSkin.MouseState.HOVER; + this.tbCFSlowDown.Name = "tbCFSlowDown"; + this.tbCFSlowDown.PasswordChar = '\0'; + this.tbCFSlowDown.SelectedText = ""; + this.tbCFSlowDown.SelectionLength = 0; + this.tbCFSlowDown.SelectionStart = 0; + this.tbCFSlowDown.Size = new System.Drawing.Size(37, 23); + this.tbCFSlowDown.TabIndex = 33; + this.tbCFSlowDown.Text = "0.4"; + this.tbCFSlowDown.UseSystemPasswordChar = false; + // + // tbCFSlowUp + // + this.tbCFSlowUp.Depth = 0; + this.tbCFSlowUp.Hint = ""; + this.tbCFSlowUp.Location = new System.Drawing.Point(162, 390); + this.tbCFSlowUp.MouseState = MaterialSkin.MouseState.HOVER; + this.tbCFSlowUp.Name = "tbCFSlowUp"; + this.tbCFSlowUp.PasswordChar = '\0'; + this.tbCFSlowUp.SelectedText = ""; + this.tbCFSlowUp.SelectionLength = 0; + this.tbCFSlowUp.SelectionStart = 0; + this.tbCFSlowUp.Size = new System.Drawing.Size(39, 23); + this.tbCFSlowUp.TabIndex = 33; + this.tbCFSlowUp.Text = "0.4"; + this.tbCFSlowUp.UseSystemPasswordChar = false; + // + // tbCFSlowSD + // + this.tbCFSlowSD.Depth = 0; + this.tbCFSlowSD.Hint = ""; + this.tbCFSlowSD.Location = new System.Drawing.Point(103, 390); + this.tbCFSlowSD.MouseState = MaterialSkin.MouseState.HOVER; + this.tbCFSlowSD.Name = "tbCFSlowSD"; + this.tbCFSlowSD.PasswordChar = '\0'; + this.tbCFSlowSD.SelectedText = ""; + this.tbCFSlowSD.SelectionLength = 0; + this.tbCFSlowSD.SelectionStart = 0; + this.tbCFSlowSD.Size = new System.Drawing.Size(30, 23); + this.tbCFSlowSD.TabIndex = 31; + this.tbCFSlowSD.Text = "0.2"; + this.tbCFSlowSD.UseSystemPasswordChar = false; + // + // materialLabel15 + // + this.materialLabel15.AutoSize = true; + this.materialLabel15.Depth = 0; + this.materialLabel15.Font = new System.Drawing.Font("Roboto", 11F); + this.materialLabel15.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.materialLabel15.Location = new System.Drawing.Point(25, 391); + this.materialLabel15.MouseState = MaterialSkin.MouseState.HOVER; + this.materialLabel15.Name = "materialLabel15"; + this.materialLabel15.Size = new System.Drawing.Size(57, 19); + this.materialLabel15.TabIndex = 30; + this.materialLabel15.Text = "저 변동성"; + // + // materialLabel11 + // + this.materialLabel11.AutoSize = true; + this.materialLabel11.Depth = 0; + this.materialLabel11.Font = new System.Drawing.Font("Roboto", 11F); + this.materialLabel11.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.materialLabel11.Location = new System.Drawing.Point(209, 355); + this.materialLabel11.MouseState = MaterialSkin.MouseState.HOVER; + this.materialLabel11.Name = "materialLabel11"; + this.materialLabel11.Size = new System.Drawing.Size(13, 19); + this.materialLabel11.TabIndex = 29; + this.materialLabel11.Text = "-"; + // + // materialLabel8 + // + this.materialLabel8.AutoSize = true; + this.materialLabel8.Depth = 0; + this.materialLabel8.Font = new System.Drawing.Font("Roboto", 11F); + this.materialLabel8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.materialLabel8.Location = new System.Drawing.Point(143, 355); + this.materialLabel8.MouseState = MaterialSkin.MouseState.HOVER; + this.materialLabel8.Name = "materialLabel8"; + this.materialLabel8.Size = new System.Drawing.Size(18, 19); + this.materialLabel8.TabIndex = 29; + this.materialLabel8.Text = "+"; + // + // tbCFFastDown + // + this.tbCFFastDown.Depth = 0; + this.tbCFFastDown.Hint = ""; + this.tbCFFastDown.Location = new System.Drawing.Point(222, 355); + this.tbCFFastDown.MouseState = MaterialSkin.MouseState.HOVER; + this.tbCFFastDown.Name = "tbCFFastDown"; + this.tbCFFastDown.PasswordChar = '\0'; + this.tbCFFastDown.SelectedText = ""; + this.tbCFFastDown.SelectionLength = 0; + this.tbCFFastDown.SelectionStart = 0; + this.tbCFFastDown.Size = new System.Drawing.Size(37, 23); + this.tbCFFastDown.TabIndex = 28; + this.tbCFFastDown.Text = "0.05"; + this.tbCFFastDown.UseSystemPasswordChar = false; + // + // tbCFFastUp + // + this.tbCFFastUp.Depth = 0; + this.tbCFFastUp.Hint = ""; + this.tbCFFastUp.Location = new System.Drawing.Point(162, 355); + this.tbCFFastUp.MouseState = MaterialSkin.MouseState.HOVER; + this.tbCFFastUp.Name = "tbCFFastUp"; + this.tbCFFastUp.PasswordChar = '\0'; + this.tbCFFastUp.SelectedText = ""; + this.tbCFFastUp.SelectionLength = 0; + this.tbCFFastUp.SelectionStart = 0; + this.tbCFFastUp.Size = new System.Drawing.Size(39, 23); + this.tbCFFastUp.TabIndex = 28; + this.tbCFFastUp.Text = "0.05"; + this.tbCFFastUp.UseSystemPasswordChar = false; + // + // tbCFFastSD + // + this.tbCFFastSD.Depth = 0; + this.tbCFFastSD.Hint = ""; + this.tbCFFastSD.Location = new System.Drawing.Point(103, 355); + this.tbCFFastSD.MouseState = MaterialSkin.MouseState.HOVER; + this.tbCFFastSD.Name = "tbCFFastSD"; + this.tbCFFastSD.PasswordChar = '\0'; + this.tbCFFastSD.SelectedText = ""; + this.tbCFFastSD.SelectionLength = 0; + this.tbCFFastSD.SelectionStart = 0; + this.tbCFFastSD.Size = new System.Drawing.Size(30, 23); + this.tbCFFastSD.TabIndex = 26; + this.tbCFFastSD.Text = "0.75"; + this.tbCFFastSD.UseSystemPasswordChar = false; + // + // materialLabel12 + // + this.materialLabel12.AutoSize = true; + this.materialLabel12.Depth = 0; + this.materialLabel12.Font = new System.Drawing.Font("Roboto", 11F); + this.materialLabel12.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.materialLabel12.Location = new System.Drawing.Point(25, 356); + this.materialLabel12.MouseState = MaterialSkin.MouseState.HOVER; + this.materialLabel12.Name = "materialLabel12"; + this.materialLabel12.Size = new System.Drawing.Size(57, 19); + this.materialLabel12.TabIndex = 25; + this.materialLabel12.Text = "고 변동성"; + // + // tbCFTimeLimit + // + this.tbCFTimeLimit.Depth = 0; + this.tbCFTimeLimit.Hint = ""; + this.tbCFTimeLimit.Location = new System.Drawing.Point(151, 424); + this.tbCFTimeLimit.MouseState = MaterialSkin.MouseState.HOVER; + this.tbCFTimeLimit.Name = "tbCFTimeLimit"; + this.tbCFTimeLimit.PasswordChar = '\0'; + this.tbCFTimeLimit.SelectedText = ""; + this.tbCFTimeLimit.SelectionLength = 0; + this.tbCFTimeLimit.SelectionStart = 0; + this.tbCFTimeLimit.Size = new System.Drawing.Size(30, 23); + this.tbCFTimeLimit.TabIndex = 23; + this.tbCFTimeLimit.Text = "5"; + this.tbCFTimeLimit.UseSystemPasswordChar = false; + // + // tbCFTimeDown + // + this.tbCFTimeDown.Depth = 0; + this.tbCFTimeDown.Hint = ""; + this.tbCFTimeDown.Location = new System.Drawing.Point(63, 424); + this.tbCFTimeDown.MouseState = MaterialSkin.MouseState.HOVER; + this.tbCFTimeDown.Name = "tbCFTimeDown"; + this.tbCFTimeDown.PasswordChar = '\0'; + this.tbCFTimeDown.SelectedText = ""; + this.tbCFTimeDown.SelectionLength = 0; + this.tbCFTimeDown.SelectionStart = 0; + this.tbCFTimeDown.Size = new System.Drawing.Size(30, 23); + this.tbCFTimeDown.TabIndex = 23; + this.tbCFTimeDown.Text = "0.02"; + this.tbCFTimeDown.UseSystemPasswordChar = false; + // + // tbCFListSize + // + this.tbCFListSize.Depth = 0; + this.tbCFListSize.Hint = ""; + this.tbCFListSize.Location = new System.Drawing.Point(88, 323); + this.tbCFListSize.MouseState = MaterialSkin.MouseState.HOVER; + this.tbCFListSize.Name = "tbCFListSize"; + this.tbCFListSize.PasswordChar = '\0'; + this.tbCFListSize.SelectedText = ""; + this.tbCFListSize.SelectionLength = 0; + this.tbCFListSize.SelectionStart = 0; + this.tbCFListSize.Size = new System.Drawing.Size(30, 23); + this.tbCFListSize.TabIndex = 23; + this.tbCFListSize.Text = "20"; + this.tbCFListSize.UseSystemPasswordChar = false; + // + // materialLabel16 + // + this.materialLabel16.AutoSize = true; + this.materialLabel16.Depth = 0; + this.materialLabel16.Font = new System.Drawing.Font("Roboto", 11F); + this.materialLabel16.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.materialLabel16.Location = new System.Drawing.Point(99, 424); + this.materialLabel16.MouseState = MaterialSkin.MouseState.HOVER; + this.materialLabel16.Name = "materialLabel16"; + this.materialLabel16.Size = new System.Drawing.Size(31, 19); + this.materialLabel16.TabIndex = 22; + this.materialLabel16.Text = "감소"; + // + // materialLabel9 + // + this.materialLabel9.AutoSize = true; + this.materialLabel9.Depth = 0; + this.materialLabel9.Font = new System.Drawing.Font("Roboto", 11F); + this.materialLabel9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.materialLabel9.Location = new System.Drawing.Point(26, 424); + this.materialLabel9.MouseState = MaterialSkin.MouseState.HOVER; + this.materialLabel9.Name = "materialLabel9"; + this.materialLabel9.Size = new System.Drawing.Size(31, 19); + this.materialLabel9.TabIndex = 22; + this.materialLabel9.Text = "초당"; + // + // materialLabel10 + // + this.materialLabel10.AutoSize = true; + this.materialLabel10.Depth = 0; + this.materialLabel10.Font = new System.Drawing.Font("Roboto", 11F); + this.materialLabel10.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.materialLabel10.Location = new System.Drawing.Point(25, 322); + this.materialLabel10.MouseState = MaterialSkin.MouseState.HOVER; + this.materialLabel10.Name = "materialLabel10"; + this.materialLabel10.Size = new System.Drawing.Size(46, 19); + this.materialLabel10.TabIndex = 22; + this.materialLabel10.Text = "체결 수"; + // + // 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, 614); + 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.03.27.11"; + // + // 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.chSMHalfTrailing); + 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.tbSMTimeDiffLimit); + this.tabPage3.Controls.Add(this.tbSMIgnorePrice); + this.tabPage3.Controls.Add(this.tbSMTimeSub); + 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(1133, 636); + this.tabPage3.TabIndex = 2; + this.tabPage3.Text = "Simulation"; + this.tabPage3.UseVisualStyleBackColor = true; + // + // chSMHalfTrailing + // + this.chSMHalfTrailing.AutoSize = true; + this.chSMHalfTrailing.Depth = 0; + this.chSMHalfTrailing.Font = new System.Drawing.Font("Roboto", 10F); + this.chSMHalfTrailing.Location = new System.Drawing.Point(516, 116); + this.chSMHalfTrailing.Margin = new System.Windows.Forms.Padding(0); + this.chSMHalfTrailing.MouseLocation = new System.Drawing.Point(-1, -1); + this.chSMHalfTrailing.MouseState = MaterialSkin.MouseState.HOVER; + this.chSMHalfTrailing.Name = "chSMHalfTrailing"; + this.chSMHalfTrailing.Ripple = true; + this.chSMHalfTrailing.Size = new System.Drawing.Size(100, 30); + this.chSMHalfTrailing.TabIndex = 10; + this.chSMHalfTrailing.Text = "half trailing"; + this.chSMHalfTrailing.UseVisualStyleBackColor = true; + // + // 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.4"; + // + // 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.05"; + // + // 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.4"; + // + // tbSMTimeDiffLimit + // + this.tbSMTimeDiffLimit.Location = new System.Drawing.Point(375, 101); + this.tbSMTimeDiffLimit.Name = "tbSMTimeDiffLimit"; + this.tbSMTimeDiffLimit.Size = new System.Drawing.Size(36, 21); + this.tbSMTimeDiffLimit.TabIndex = 6; + this.tbSMTimeDiffLimit.Text = "5"; + // + // tbSMIgnorePrice + // + this.tbSMIgnorePrice.Location = new System.Drawing.Point(333, 128); + this.tbSMIgnorePrice.Name = "tbSMIgnorePrice"; + this.tbSMIgnorePrice.Size = new System.Drawing.Size(59, 21); + this.tbSMIgnorePrice.TabIndex = 6; + this.tbSMIgnorePrice.Text = "50000"; + // + // tbSMTimeSub + // + this.tbSMTimeSub.Location = new System.Drawing.Point(333, 101); + this.tbSMTimeSub.Name = "tbSMTimeSub"; + this.tbSMTimeSub.Size = new System.Drawing.Size(36, 21); + this.tbSMTimeSub.TabIndex = 6; + this.tbSMTimeSub.Text = "0.02"; + // + // 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.05"; + // + // 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.HideSelection = false; + this.tbSimulationLog.Location = new System.Drawing.Point(0, 204); + this.tbSimulationLog.Name = "tbSimulationLog"; + this.tbSimulationLog.Size = new System.Drawing.Size(1133, 432); + 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); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1147, 837); + this.ClientSize = new System.Drawing.Size(1147, 780); this.Controls.Add(this.materialTabSelector1); this.Controls.Add(this.materialTabControl1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); @@ -1264,5 +1289,7 @@ private MaterialSkin.Controls.MaterialLabel materialLabel9; private MaterialSkin.Controls.MaterialLabel materialLabel10; public System.Windows.Forms.TextBox tbSMIgnorePrice; + private System.Windows.Forms.ColumnHeader chNCOrgOrderNo; + public MaterialSkin.Controls.MaterialCheckBox chSMHalfTrailing; } } \ No newline at end of file diff --git a/AutoSeller.cs b/AutoSeller.cs index babde20..6fb48a4 100644 --- a/AutoSeller.cs +++ b/AutoSeller.cs @@ -25,7 +25,6 @@ namespace AutoSellerNS public int m_iAvailableQuantity; public double m_dBookUnitPrice; public long m_iProfitUnitPrice; - public int m_iSellableCnt; public int m_iCurPrice; } @@ -118,27 +117,21 @@ namespace AutoSellerNS if(m_bSell == false) return; - string strLog = ""; - lock(m_NCItems) + var ClonedList = m_NCItems.ConvertAll(s => s); + foreach(var NCItem in ClonedList) { - foreach(var NCItem in m_NCItems) + if(NCItem.m_bAsk == true && DateTime.Now-NCItem.m_Time >= TimeSpan.FromSeconds(5)) { - if(NCItem.m_bAsk == true && DateTime.Now-NCItem.m_Time >= TimeSpan.FromSeconds(5)) - { - var CurItem = m_CybosHelper.GetItem(NCItem.m_strCode); - if(CurItem == null) - continue; + var CurItem = m_CybosHelper.GetItem(NCItem.m_strCode); + if(CurItem == null) + continue; - int iAskPrice = CurItem.m_aiAskPrice[0]; - m_CybosHelper.CorrectionItem(NCItem.m_strCode, NCItem.m_iOrgOrderNo, NCItem.m_iRemainCnt, iAskPrice); - NCItem.m_Time = DateTime.Now; - strLog += (string.Format("[{0}] 정정 주문", NCItem.m_strCodeName) + Environment.NewLine); - } + int iAskPrice = CurItem.m_aiAskPrice[0]; + m_CybosHelper.CorrectionItem(NCItem.m_strCode, NCItem.m_iOrgOrderNo, NCItem.m_iRemainCnt, iAskPrice); + NCItem.m_Time = DateTime.Now; + Util.Log(Util.LOG_TYPE.SELL, string.Format("[{0}] 정정 주문", NCItem.m_strCodeName)); } } - - if(strLog.Length > 0) - Util.Log(Util.LOG_TYPE.SELL, strLog); } public void SetAccountList(string[] aAccountList) @@ -246,7 +239,7 @@ namespace AutoSellerNS m_Items.Clear(); lvItems.Items.Clear(); - foreach (var Item in Items) + foreach(var Item in Items) AddItem(Item); // 미체결 @@ -257,7 +250,7 @@ namespace AutoSellerNS { var NCItems = m_CybosHelper.UpdateNC(); - lock(m_NCItems) + //lock(m_NCItems) { m_NCItems.RemoveAll(s => NCItems.Any(t => t.m_iOrgOrderNo== s.m_iOrgOrderNo) == false); foreach(var NCItem in NCItems) @@ -277,6 +270,7 @@ namespace AutoSellerNS foreach(var NCItem in NCItems) { ListViewItem viewItem = new ListViewItem(new string[] { + NCItem.m_iOrgOrderNo.ToString(), NCItem.m_strCode, NCItem.m_strCodeName, NCItem.m_strDesc, @@ -294,12 +288,13 @@ namespace AutoSellerNS foreach(var NCItem in NCItems) { ListViewItem viewItem = new ListViewItem(new string[] { - NCItem.m_strCode, - NCItem.m_strCodeName, - NCItem.m_strDesc, - string.Format("{0:n0}", NCItem.m_iOrderPrice), - string.Format("{0:n0}", NCItem.m_iRemainCnt), - }); + NCItem.m_iOrgOrderNo.ToString(), + NCItem.m_strCode, + NCItem.m_strCodeName, + NCItem.m_strDesc, + string.Format("{0:n0}", NCItem.m_iOrderPrice), + string.Format("{0:n0}", NCItem.m_iRemainCnt), + }); lvNCItem.Items.Add(viewItem); viewItem.UseItemStyleForSubItems = false; viewItem.SubItems[chNCType.Index].ForeColor = NCItem.m_bAsk ? Color.Blue : Color.Red; @@ -309,28 +304,16 @@ namespace AutoSellerNS public void UpdateItem(string strCode, string strCodeName, bool bBid, int iConclusionCnt, int iRemainCnt, int iBookValue) { - btUpdate_Click(null, null); - //if(lvList.InvokeRequired) - //{ + // 잔고 + var Items = m_CybosHelper.UpdateItems(); - //} - //else - //{ - // ListViewItem Item = lvList.Items.Cast().FirstOrDefault(s => s.SubItems[chCode.Index].Text == strCode); - // if(Item == default(ListViewItem) && iRemainCnt > 0) - // { - // // 아이템 추가 - // } - // else - // { - // // 갱신 - // Item.SubItems[chCount.Index].Text = string.Format("{0:n0}", iRemainCnt); - // Item.SubItems[chBookValue.Index].Text = string.Format("{0:n2}", iBookValue); - // } - //} + m_Items.Clear(); + lvItems.Items.Clear(); + foreach(var Item in Items) + AddItem(Item); } - public void OnReceipt() + public void UpdateNCItem() { UpdateNC(); } @@ -353,8 +336,9 @@ namespace AutoSellerNS return; Item.m_iCurPrice = iPrice; - Item.m_iAssessedValue = (int)(iPrice * Item.m_iAvailableQuantity * 99.94 / 100); - Item.m_dYield = (Item.m_iCurPrice - Item.m_iProfitUnitPrice) * 100 / (double)Item.m_iProfitUnitPrice; + Item.m_iAssessedValue = iPrice * Item.m_iItemCnt; + Item.m_iValuationGains = (iPrice-Item.m_iProfitUnitPrice)*Item.m_iItemCnt; + Item.m_dYield = (iPrice-Item.m_iProfitUnitPrice)*100 / (double)Item.m_iProfitUnitPrice; if (lvItems.InvokeRequired) { @@ -366,6 +350,7 @@ namespace AutoSellerNS row.SubItems[chCurPrice.Index].Text = string.Format("{0}{1:n0}", bReal?"":"*", Item.m_iCurPrice); row.SubItems[chAssessedValue.Index].Text = string.Format("{0:n0}", Item.m_iAssessedValue); + row.SubItems[chValuation.Index].Text = string.Format("{0:n0}", Item.m_iValuationGains); row.SubItems[chYield.Index].Text = string.Format("{0:n2}", Item.m_dYield); row.SubItems[chMaxPrice.Index].Text = string.Format("{0:n0}", iMaxPrice); row.SubItems[chCheckCountLimit.Index].Text = string.Format("{0:n2}", dCheckCountLimit); @@ -380,6 +365,7 @@ namespace AutoSellerNS row.SubItems[chCurPrice.Index].Text = string.Format("{0}{1:n0}", bReal?"":"*", Item.m_iCurPrice); row.SubItems[chAssessedValue.Index].Text = string.Format("{0:n0}", Item.m_iAssessedValue); + row.SubItems[chValuation.Index].Text = string.Format("{0:n0}", Item.m_iValuationGains); row.SubItems[chYield.Index].Text = string.Format("{0:n2}", Item.m_dYield); row.SubItems[chMaxPrice.Index].Text = string.Format("{0:n0}", iMaxPrice); row.SubItems[chCheckCountLimit.Index].Text = string.Format("{0:n2}", dCheckCountLimit); @@ -455,7 +441,7 @@ namespace AutoSellerNS if(Item == default(ITEM)) return 0; - return Item.m_iSellableCnt; + return Item.m_iAvailableQuantity; } private void lvList_SelectedIndexChanged(object sender, EventArgs e) diff --git a/CybosHelper.cs b/CybosHelper.cs index e98d4b6..2853941 100644 --- a/CybosHelper.cs +++ b/CybosHelper.cs @@ -107,7 +107,7 @@ namespace AutoSellerNS m_iMaxPrice)); } - if(iTimeDiff >= Config.GetTimeLimit()) + if(iTimeDiff >= Config.GetTimeLimit() && m_Listener.IsSelling() == true) { m_CybosHelper.SellItem(m_strCode, m_Listener.GetSellableCount(m_strCode), m_aiAskPrice[0]); Util.Log(Util.LOG_TYPE.SELL, string.Format("[시간제한 매도] {0} ({1}초) (현재가 {2:n0}원, 최고가 {3:n0}원)", @@ -223,7 +223,6 @@ namespace AutoSellerNS Item.m_iAvailableQuantity = m_6033.GetDataValue(15, i); Item.m_dBookUnitPrice = m_6033.GetDataValue(17, i); Item.m_iProfitUnitPrice = m_6033.GetDataValue(18, i); - Item.m_iSellableCnt = m_6033.GetDataValue(15, i); if(strCodeList.Length > 0) strCodeList += ","; @@ -242,7 +241,7 @@ namespace AutoSellerNS { DSCBO1Lib.StockMst2 StockMst = new DSCBO1Lib.StockMst2(); StockMst.SetInputValue(0, strCodeList); - StockMst.BlockRequest2(0); + StockMst.BlockRequest2(1); int iCnt = StockMst.GetHeaderValue(0); for (int i = 0; i < iCnt; i++) { @@ -272,43 +271,54 @@ namespace AutoSellerNS return aItems; } + static int iUpdateNCIdx = 1; public List UpdateNC() { + int iIdx = iUpdateNCIdx++; + Util.Log(Util.LOG_TYPE.DEBUG, string.Format("UpdateNC Start ({0}, {1}, {2}, {3})", iIdx, + GetLimitRemainCountRQ(), GetLimitRemainCountSB(), GetLimitRemainCountTrade() + )); + + while(GetLimitRemainCountTrade() < 1) + Thread.Sleep(500); + List NCItems = new List(); - lock(m_NCItemLock) + + CPTRADELib.CpTd5339 CP5339 = new CPTRADELib.CpTd5339(); + CP5339.SetInputValue(0, Config.GetAccount()); + CP5339.SetInputValue(1, Config.GetSubAccount()); + CP5339.BlockRequest2(1); + + bool bContinue = true; + while(bContinue) { - CPTRADELib.CpTd5339 CP5339 = new CPTRADELib.CpTd5339(); - CP5339.SetInputValue(0, Config.GetAccount()); - CP5339.SetInputValue(1, Config.GetSubAccount()); - CP5339.BlockRequest2(0); + int iCnt = CP5339.GetHeaderValue(5); + Console.WriteLine("icnt : {0}", iCnt); - bool bContinue = true; - while(bContinue) + for(int i = 0; i aaRows = new List(); @@ -262,7 +262,7 @@ namespace AutoSellerNS { while(m_CybosHelper.GetLimitRemainCountRQ() < 2) Thread.Sleep(100); - CPStockBid.BlockRequest2(0); + CPStockBid.BlockRequest2(1); } m_tbLogView.AppendText(string.Format("RequestRQ({0}) ", m_CybosHelper.GetLimitRemainCountRQ())); @@ -450,6 +450,7 @@ namespace AutoSellerNS double dTimeSub = (double)aParams[10]; int iTimeDiffLimit = (int)aParams[11]; int iIgnorePrice = (int)aParams[12]; + bool bHalfTrailing = (bool)aParams[13]; var tokens = strLine.Split('\t'); @@ -521,7 +522,7 @@ namespace AutoSellerNS int iPrice = (int)(double)Sheet.Cells[iRow, 3].Value; int iAskPrice = (int)(double)Sheet.Cells[iRow, 4].Value; int iBidPrice = (int)(double)Sheet.Cells[iRow, 5].Value; - int iConclusionCnt = (int)(double)Sheet.Cells[iRow, 8].Value; + int iConclusionCnt = (int)(double)Sheet.Cells[iRow, 7].Value; int iTimeDiff = 0; if(iPrevTime > 0) @@ -661,7 +662,7 @@ namespace AutoSellerNS if(iAskCount >= Math.Round(dCheckCount)) { iSellPrice = iPrice - m_CybosHelper.GetUnitValue(iPrice); - strReturnMsg = string.Format("[{0}] [{1}] 조건1 매도 (매수: {2:n0}원, {3}, line:{4}) (매도: {5:n0}원(매도가:{6:n0}원) {7} line:{8}) (손익: {9}, {10:n0} : {11:n2}%) {12} \n", + strReturnMsg = string.Format("[{0}] [{1}] 조건 매도\n\t\t매수: {2:n0}원, {3}, line:{4}\n\t\t매도: {5:n0}원(매도가:{6:n0}원) {7} line:{8} (최고가: {9:n0})\n\t\t손익: {10}, {11:n0} : {12:n2}% ({13:n2}) \n", StartDT.ToString("yyyy-MM-dd"), strCodeName, @@ -673,6 +674,7 @@ namespace AutoSellerNS iSellPrice, RowDT.ToString("HH:mm:ss"), iRow, + iMaxPrice, iSellPrice-iStartPrice, (iSellPrice-iStartPrice)*iStockCount, @@ -705,7 +707,7 @@ namespace AutoSellerNS if(iTrailingCount >= Config.GetTrailingCnt()) { iSellPrice = iPrice - m_CybosHelper.GetUnitValue(iPrice); - strReturnMsg = string.Format("[{0}] [{1}] 트레일링 매도 (매수: {2:n0}원, {3}, line:{4}) (매도: {5:n0}원(매도가:{6:n0}원) {7} line:{8}) (손익: {9}, {10:n0} : {11:n2}%) {12} \n", + strReturnMsg = string.Format("[{0}] [{1}] 트레일링 매도 \n\t\t매수: {2:n0}원, {3}, line:{4}\n\t\t매도: {5:n0}원(매도가:{6:n0}원) {7} line:{8} (최고가: {9:n0})\n\t\t손익: {10}, {11:n0} : {12:n2}% ({13:n2}) \n", StartDT.ToString("yyyy-MM-dd"), strCodeName, @@ -717,6 +719,7 @@ namespace AutoSellerNS iSellPrice, RowDT.ToString("HH:mm:ss"), iRow, + iMaxPrice, iSellPrice-iStartPrice, (iSellPrice-iStartPrice)*iStockCount, @@ -735,10 +738,10 @@ namespace AutoSellerNS break; } - if(iTimeDiff >= iTimeDiffLimit) + if(bHalfTrailing == true && iMaxPrice/(float)iStartPrice >= 1.02 && iPrice < (iStartPrice+iMaxPrice)/2) { iSellPrice = iPrice - m_CybosHelper.GetUnitValue(iPrice); - strReturnMsg = string.Format("[{0}] [{1}] 제한시간 매도 (매수: {2:n0}원, {3}, line:{4}) (매도: {5:n0}원(매도가:{6:n0}원) {7} line:{8}) (손익: {9}, {10:n0} : {11:n2}%) {12} \n", + strReturnMsg = string.Format("[{0}] [{1}] 트레일링2 매도\n\t\t매수: {2:n0}원, {3}, line:{4}\n\t\t매도: {5:n0}원(매도가:{6:n0}원 {7} line:{8} (최고가: {9:n0})\n\t\t손익: {10}, {11:n0} : {12:n2}%) ({13:n2}) \n", StartDT.ToString("yyyy-MM-dd"), strCodeName, @@ -750,6 +753,61 @@ namespace AutoSellerNS iSellPrice, RowDT.ToString("HH:mm:ss"), iRow, + iMaxPrice, + + iSellPrice-iStartPrice, + (iSellPrice-iStartPrice)*iStockCount, + (iSellPrice-iStartPrice)*100/(float)iStartPrice, + + dCheckCount + + ); + + break; + } + + double dSlope = 0; + if(m_PriceList.Count >= 5) + { + List LastSample = new List(); + for(int i = 0; i<5; i++) + { + Point Pos = new Point(); + Pos.X = m_PriceList[m_PriceList.Count-i-1]; + Pos.X = Pos.X/m_CybosHelper.GetUnitValue(Pos.X); + + Pos.Y = 5-i; + + LastSample.Add(Pos); + } + + double xBar = LastSample.Average(p => p.X); + double yBar = LastSample.Average(p => p.Y); + + double dividend = LastSample.Sum(p => (p.X - xBar) * (p.Y - yBar)); + double divisor = (double)LastSample.Sum(p => Math.Pow(p.X - xBar, 2)); + + dSlope = dividend / divisor; + Sheet.Cells[iRow, 13].Value = dSlope; + } + + + if(iTimeDiff >= iTimeDiffLimit) + { + iSellPrice = iPrice - m_CybosHelper.GetUnitValue(iPrice); + strReturnMsg = string.Format("[{0}] [{1}] 제한시간 매도\n\t\t매수: {2:n0}원, {3}, line:{4}\n\t\t매도: {5:n0}원(매도가:{6:n0}원) {7} line:{8} (최고가: {9:n0})\n\t\t손익: {10}, {11:n0} : {12:n2}%) ({13:n2}) \n", + StartDT.ToString("yyyy-MM-dd"), + strCodeName, + + iStartPrice, + StartDT.ToString("HH:mm:ss"), + iStartRow, + + iPrice, + iSellPrice, + RowDT.ToString("HH:mm:ss"), + iRow, + iMaxPrice, iSellPrice-iStartPrice, (iSellPrice-iStartPrice)*iStockCount, @@ -774,7 +832,7 @@ namespace AutoSellerNS if(iRow == iMaxRow) { iSellPrice = iPrice - m_CybosHelper.GetUnitValue(iPrice); - strReturnMsg = string.Format("[{0}] [{1}] 종료 매도 (매수: {2:n0}원, {3}, line:{4}) (매도: {5:n0}원(매도가:{6:n0}원) {7} line:{8}) (손익: {9}, {10:n0} : {11:n2}%) {12} \n", + strReturnMsg = string.Format("[{0}] [{1}] 종료 매도\n\t\t매수: {2:n0}원, {3}, line:{4}\n\t\t매도: {5:n0}원(매도가:{6:n0}원) {7} line:{8} (최고가: {9:n0})\n\t\t손익: {10}, {11:n0} : {12:n2}%) ({13:n2}) \n", StartDT.ToString("yyyy-MM-dd"), strCodeName, @@ -841,11 +899,12 @@ namespace AutoSellerNS double dTimeSub = (double)aParams[9]; int iTimeDiffLimit = (int)aParams[10]; int iIgnorePrice = (int)aParams[11]; + bool bHalfTrailing = (bool)aParams[12]; - InsertLog(string.Format("[시뮬레이션 시작] 조건 : {0}회, 트레일링 : {1}%, {2}회\n \t\t리스트 크기:{3}, Fast : {4}, {5}, {6}, Slow : {7}, {8}, {9}, 초당 {10} 감소, 제한 시간: {11}, {12}원 이하 무시, 비교 방식 : {13}\n", + InsertLog(string.Format("[시뮬레이션 시작] 조건 : {0}회, 트레일링 : {1}%, {2}회\n\t\t리스트 크기:{3}, Fast : {4}, {5}, {6}, Slow : {7}, {8}, {9}, 초당 {10} 감소, 제한 시간: {11}, {12}원 이하 무시, \n\t\t트레일링2 : {13}, 비교 방식 : {14}\n", Config.GetBidCount(), Config.GetTrailingRate(), Config.GetTrailingCnt(), iListCnt, dFastSD, dFastUpCnt, dFastDownCnt, dSlowSD, dSlowUpCnt, dSlowDownCnt, - dTimeSub, iTimeDiffLimit, iIgnorePrice, + dTimeSub, iTimeDiffLimit, iIgnorePrice, bHalfTrailing, strMethod )); @@ -861,7 +920,7 @@ namespace AutoSellerNS dSlowSD, dSlowUpCnt, dSlowDownCnt, iCompareType, strMethod, strLine, dTimeSub, iTimeDiffLimit, - iIgnorePrice })); + iIgnorePrice, bHalfTrailing })); aTasks.Add(task); } @@ -891,6 +950,7 @@ namespace AutoSellerNS double dTimeSub; int iTimeDiffLimit; int iIgnorePrice; + bool bHalfTrailing; int.TryParse(m_AutoSeller.tbSMListSize.Text, out iListCnt); double.TryParse(m_AutoSeller.tbSMFastSD.Text, out dFastSD); @@ -902,6 +962,7 @@ namespace AutoSellerNS double.TryParse(m_AutoSeller.tbSMTimeSub.Text, out dTimeSub); int.TryParse(m_AutoSeller.tbSMTimeDiffLimit.Text, out iTimeDiffLimit); int.TryParse(m_AutoSeller.tbSMIgnorePrice.Text, out iIgnorePrice); + bHalfTrailing = m_AutoSeller.chSMHalfTrailing.Checked; string strMethod = ""; m_AutoSeller.cbSMMethod.Invoke(new Action(() => { @@ -931,7 +992,7 @@ namespace AutoSellerNS dFastSD, dFastUpCnt, dFastDownCnt, dSlowSD, dSlowUpCnt, dSlowDownCnt, iCompareType, strMethod, dTimeSub, iTimeDiffLimit, - iIgnorePrice + iIgnorePrice, bHalfTrailing }); // } // } diff --git a/Util.cs b/Util.cs index 5851e50..dc20a63 100644 --- a/Util.cs +++ b/Util.cs @@ -39,6 +39,9 @@ namespace AutoSellerNS static void InsertLog(RichTextBox LogBox, LOG_TYPE enType, string strLog) { + if(IsDebugging() == false && enType == LOG_TYPE.DEBUG) + return; + if(LogBox.InvokeRequired) { LogBox.Invoke(m_InsertLogDelegate, LogBox, enType, strLog);