diff --git a/AutoSeller.Designer.cs b/AutoSeller.Designer.cs index dc4e244..8fea9a0 100644 --- a/AutoSeller.Designer.cs +++ b/AutoSeller.Designer.cs @@ -36,32 +36,6 @@ this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.splitContainer3 = new System.Windows.Forms.SplitContainer(); - this.tbLog = new System.Windows.Forms.RichTextBox(); - this.btUpdate = new MaterialSkin.Controls.MaterialRaisedButton(); - this.btCybos = new MaterialSkin.Controls.MaterialRaisedButton(); - this.tabPage2 = new System.Windows.Forms.TabPage(); - this.materialLabel7 = new MaterialSkin.Controls.MaterialLabel(); - this.tbTrailingCnt = new MaterialSkin.Controls.MaterialSingleLineTextField(); - this.materialLabel6 = new MaterialSkin.Controls.MaterialLabel(); - this.tbTrailingP = new MaterialSkin.Controls.MaterialSingleLineTextField(); - this.materialLabel5 = new MaterialSkin.Controls.MaterialLabel(); - this.materialLabel4 = new MaterialSkin.Controls.MaterialLabel(); - this.materialLabel3 = new MaterialSkin.Controls.MaterialLabel(); - this.materialLabel2 = new MaterialSkin.Controls.MaterialLabel(); - this.tbBidCount = new MaterialSkin.Controls.MaterialSingleLineTextField(); - this.materialLabel1 = new MaterialSkin.Controls.MaterialLabel(); - this.btApply = new MaterialSkin.Controls.MaterialFlatButton(); - this.tbSubAccount = new MaterialSkin.Controls.MaterialSingleLineTextField(); - this.cbAccount = new System.Windows.Forms.ComboBox(); - this.tabPage3 = new System.Windows.Forms.TabPage(); - this.tbSMListSize = new System.Windows.Forms.TextBox(); - this.tbSMSlowCnt = new System.Windows.Forms.TextBox(); - this.tbSMSlowSD = new System.Windows.Forms.TextBox(); - this.tbSMFastCnt = 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.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())); @@ -80,11 +54,38 @@ 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(); + this.materialLabel7 = new MaterialSkin.Controls.MaterialLabel(); + this.tbTrailingCnt = new MaterialSkin.Controls.MaterialSingleLineTextField(); + this.materialLabel6 = new MaterialSkin.Controls.MaterialLabel(); + this.tbTrailingP = new MaterialSkin.Controls.MaterialSingleLineTextField(); + this.materialLabel5 = new MaterialSkin.Controls.MaterialLabel(); + this.materialLabel4 = new MaterialSkin.Controls.MaterialLabel(); + this.materialLabel3 = new MaterialSkin.Controls.MaterialLabel(); + this.materialLabel2 = new MaterialSkin.Controls.MaterialLabel(); + this.tbBidCount = new MaterialSkin.Controls.MaterialSingleLineTextField(); + this.materialLabel1 = new MaterialSkin.Controls.MaterialLabel(); + this.btApply = new MaterialSkin.Controls.MaterialFlatButton(); + this.tbSubAccount = new MaterialSkin.Controls.MaterialSingleLineTextField(); + this.cbAccount = new System.Windows.Forms.ComboBox(); + 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.tbSMSlowSD = new System.Windows.Forms.TextBox(); + this.tbSMFastCnt = 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.materialTabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); @@ -217,349 +218,6 @@ 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.17.04"; - // - // 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.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; - // - // 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); - // // lvItems // this.lvItems.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { @@ -691,6 +349,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(804, 196); + this.tbLog.TabIndex = 0; + this.tbLog.Text = ""; + // // lvCurPrice // this.lvCurPrice.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { @@ -729,6 +396,353 @@ 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); @@ -819,5 +833,6 @@ public System.Windows.Forms.TextBox tbSMFastSD; public System.Windows.Forms.TextBox tbSMSlowCnt; public System.Windows.Forms.TextBox tbSMListSize; + public System.Windows.Forms.ComboBox cbSMMethod; } } \ No newline at end of file diff --git a/SimulationHelper.cs b/SimulationHelper.cs index bed7f88..3be6254 100644 --- a/SimulationHelper.cs +++ b/SimulationHelper.cs @@ -403,7 +403,28 @@ namespace AutoSellerNS public void StartSimuation2() { - m_tbLogView.AppendText(string.Format("[시뮬레이션 시작] 조건 : {0}회, 트레일링 : {1}%, {2}회\n", Config.GetBidCount(), Config.GetTrailingRate(), Config.GetTrailingCnt())); + int iListCnt; + double dFastSD; + int iFastCnt; + double dSlowSD; + int iSlowCnt; + + 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.tbSMSlowSD.Text, out dSlowSD); + int.TryParse(m_AutoSeller.tbSMSlowCnt.Text, out iSlowCnt); + + bool bAverageCompare; + if(m_AutoSeller.cbSMMethod.SelectedText == "평균 비교") + 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 + )); int iTotalProfit = 0; int iTotalBid = 0; @@ -453,17 +474,6 @@ namespace AutoSellerNS int iCheckCount = 50; List m_PriceList = new List(); - int iListCnt; - double dFastSD; - int iFastCnt; - double dSlowSD; - int iSlowCnt; - - 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.tbSMSlowSD.Text, out dSlowSD); - int.TryParse(m_AutoSeller.tbSMSlowCnt.Text, out iSlowCnt); int iPrevAskPrice = 0; @@ -506,21 +516,40 @@ namespace AutoSellerNS if(sd >= dFastSD) { - if(iPrice >= m_PriceList[m_PriceList.Count-2]) - iCheckCount += iFastCnt; - else if(iCheckCount > 30) - iCheckCount -= iFastCnt; + if(bAverageCompare == true) + { + if(iPrice >= dAverage) + iCheckCount += iFastCnt; + else if(iCheckCount > 30) + iCheckCount -= iFastCnt; + } + else + { + if(iPrice >= m_PriceList[m_PriceList.Count-2]) + iCheckCount += iFastCnt; + else if(iCheckCount > 30) + iCheckCount -= iFastCnt; + } + } else if(sd <= dSlowSD) { - if(iPrice >= m_PriceList[m_PriceList.Count-2]) - iCheckCount += iSlowCnt; - else if(iCheckCount > 30) - iCheckCount -= iSlowCnt; + if(bAverageCompare == true) + { + if(iPrice >= dAverage) + iCheckCount += iSlowCnt; + else if(iCheckCount > 30) + iCheckCount -= iSlowCnt; + } + else + { + if(iPrice >= m_PriceList[m_PriceList.Count-2]) + iCheckCount += iSlowCnt; + else if(iCheckCount > 30) + iCheckCount -= iSlowCnt; + } } - int k = 0; - //// 체결가 비교 //if(iPrice > iPrevPrice) @@ -648,7 +677,7 @@ namespace AutoSellerNS if(iTrailingCount >= Config.GetTrailingCnt()) { int iSellPrice = iPrice - m_CybosHelper.GetUnitValue(iPrice); - m_tbLogView.AppendText(string.Format("[{0}] 트레일링 매도 (매수 : {1:n0}원, {2}, line:{3}) (매도 : {4:n0}원(매도가:{5:n0}원) {6} line:{7}) ({8}, {9:n0} : {10:n2}%) \n", + m_tbLogView.AppendText(string.Format("[{0}] 트레일링 매도 (매수 : {1:n0}원, {2}, line:{3}) (매도 : {4:n0}원(매도가:{5:n0}원) {6} line:{7}) ({8}, {9:n0} : {10:n2}%) {11} \n", strCodeName, iStartPrice, @@ -662,7 +691,9 @@ namespace AutoSellerNS iSellPrice-iStartPrice, (iSellPrice-iStartPrice)*iStockCount, - (iSellPrice-iStartPrice)*100/(float)iStartPrice + (iSellPrice-iStartPrice)*100/(float)iStartPrice, + + iCheckCount ));