diff --git a/AutoSeller.Designer.cs b/AutoSeller.Designer.cs index 454fa9d..c8ef5a2 100644 --- a/AutoSeller.Designer.cs +++ b/AutoSeller.Designer.cs @@ -40,6 +40,27 @@ this.btUpdate = new MaterialSkin.Controls.MaterialRaisedButton(); this.btCybos = new MaterialSkin.Controls.MaterialRaisedButton(); this.tabPage2 = new System.Windows.Forms.TabPage(); + this.materialLabel18 = new MaterialSkin.Controls.MaterialLabel(); + this.tbCFIgnorePrice = new MaterialSkin.Controls.MaterialSingleLineTextField(); + this.materialLabel17 = new MaterialSkin.Controls.MaterialLabel(); + this.materialLabel14 = new MaterialSkin.Controls.MaterialLabel(); + this.materialLabel13 = new MaterialSkin.Controls.MaterialLabel(); + this.tbCFSlowDown = new MaterialSkin.Controls.MaterialSingleLineTextField(); + this.tbCFSlowUp = new MaterialSkin.Controls.MaterialSingleLineTextField(); + this.tbCFSlowSD = new MaterialSkin.Controls.MaterialSingleLineTextField(); + this.materialLabel15 = new MaterialSkin.Controls.MaterialLabel(); + this.materialLabel11 = new MaterialSkin.Controls.MaterialLabel(); + this.materialLabel8 = new MaterialSkin.Controls.MaterialLabel(); + this.tbCFFastDown = new MaterialSkin.Controls.MaterialSingleLineTextField(); + this.tbCFFastUp = new MaterialSkin.Controls.MaterialSingleLineTextField(); + this.tbCFFastSD = new MaterialSkin.Controls.MaterialSingleLineTextField(); + this.materialLabel12 = new MaterialSkin.Controls.MaterialLabel(); + this.tbCFTimeLimit = new MaterialSkin.Controls.MaterialSingleLineTextField(); + this.tbCFTimeDown = new MaterialSkin.Controls.MaterialSingleLineTextField(); + this.tbCFListSize = new MaterialSkin.Controls.MaterialSingleLineTextField(); + this.materialLabel16 = new MaterialSkin.Controls.MaterialLabel(); + this.materialLabel9 = new MaterialSkin.Controls.MaterialLabel(); + this.materialLabel10 = new MaterialSkin.Controls.MaterialLabel(); this.materialLabel7 = new MaterialSkin.Controls.MaterialLabel(); this.tbTrailingCnt = new MaterialSkin.Controls.MaterialSingleLineTextField(); this.materialLabel6 = new MaterialSkin.Controls.MaterialLabel(); @@ -67,6 +88,7 @@ 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())); @@ -263,6 +285,27 @@ // 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); @@ -283,6 +326,309 @@ 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; @@ -379,7 +725,7 @@ this.materialLabel3.Name = "materialLabel3"; this.materialLabel3.Size = new System.Drawing.Size(162, 18); this.materialLabel3.TabIndex = 6; - this.materialLabel3.Text = "Version : 2017.03.07.15"; + this.materialLabel3.Text = "Version : 2017.03.20.11"; // // materialLabel2 // @@ -473,6 +819,7 @@ 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); @@ -617,6 +964,14 @@ 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[] { @@ -740,7 +1095,7 @@ // this.chNCType.Text = "매매구분"; this.chNCType.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; - this.chNCType.Width = 71; + this.chNCType.Width = 106; // // chNCPrice // @@ -887,5 +1242,27 @@ private System.Windows.Forms.ColumnHeader chCheckCountLimit; public System.Windows.Forms.TextBox tbSMTimeSub; public System.Windows.Forms.TextBox tbSMTimeDiffLimit; + private MaterialSkin.Controls.MaterialLabel materialLabel18; + private MaterialSkin.Controls.MaterialSingleLineTextField tbCFIgnorePrice; + private MaterialSkin.Controls.MaterialLabel materialLabel17; + private MaterialSkin.Controls.MaterialLabel materialLabel14; + private MaterialSkin.Controls.MaterialLabel materialLabel13; + private MaterialSkin.Controls.MaterialSingleLineTextField tbCFSlowDown; + private MaterialSkin.Controls.MaterialSingleLineTextField tbCFSlowUp; + private MaterialSkin.Controls.MaterialSingleLineTextField tbCFSlowSD; + private MaterialSkin.Controls.MaterialLabel materialLabel15; + private MaterialSkin.Controls.MaterialLabel materialLabel11; + private MaterialSkin.Controls.MaterialLabel materialLabel8; + private MaterialSkin.Controls.MaterialSingleLineTextField tbCFFastDown; + private MaterialSkin.Controls.MaterialSingleLineTextField tbCFFastUp; + private MaterialSkin.Controls.MaterialSingleLineTextField tbCFFastSD; + private MaterialSkin.Controls.MaterialLabel materialLabel12; + private MaterialSkin.Controls.MaterialSingleLineTextField tbCFTimeLimit; + private MaterialSkin.Controls.MaterialSingleLineTextField tbCFTimeDown; + private MaterialSkin.Controls.MaterialSingleLineTextField tbCFListSize; + private MaterialSkin.Controls.MaterialLabel materialLabel16; + private MaterialSkin.Controls.MaterialLabel materialLabel9; + private MaterialSkin.Controls.MaterialLabel materialLabel10; + public System.Windows.Forms.TextBox tbSMIgnorePrice; } } \ No newline at end of file diff --git a/AutoSeller.cs b/AutoSeller.cs index f469674..babde20 100644 --- a/AutoSeller.cs +++ b/AutoSeller.cs @@ -88,6 +88,17 @@ namespace AutoSellerNS tbTrailingP.Text = Config.GetTrailingRate().ToString(); tbTrailingCnt.Text = Config.GetTrailingCnt().ToString(); + tbCFListSize.Text = Config.GetListSize().ToString(); + tbCFFastSD.Text = Config.GetFastSD().ToString(); + tbCFFastUp.Text = Config.GetFastUp().ToString(); + tbCFFastDown.Text = Config.GetFastDown().ToString(); + tbCFSlowSD.Text = Config.GetSlowSD().ToString(); + tbCFSlowUp.Text = Config.GetSlowUp().ToString(); + tbCFSlowDown.Text = Config.GetSlowDown().ToString(); + tbCFTimeLimit.Text = Config.GetTimeLimit().ToString(); + tbCFTimeDown.Text = Config.GetTimeDown().ToString(); + tbCFIgnorePrice.Text = Config.GetIgnorePrice().ToString(); + m_CybosHelper = new CybosHelper(this); m_iCurPricePanelWith = 240; @@ -107,6 +118,7 @@ namespace AutoSellerNS if(m_bSell == false) return; + string strLog = ""; lock(m_NCItems) { foreach(var NCItem in m_NCItems) @@ -120,10 +132,13 @@ namespace AutoSellerNS 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)); + strLog += (string.Format("[{0}] 정정 주문", NCItem.m_strCodeName) + Environment.NewLine); } } } + + if(strLog.Length > 0) + Util.Log(Util.LOG_TYPE.SELL, strLog); } public void SetAccountList(string[] aAccountList) @@ -473,6 +488,29 @@ namespace AutoSellerNS int iTrailingCnt = 0; int.TryParse(tbTrailingCnt.Text, out iTrailingCnt); Config.SetTrailing(fTrailingPercent, iTrailingCnt); + + int iListSize; + double dFastSD; + double dFastUp; + double dFastDown; + double dSlowSD; + double dSlowUp; + double dSlowDown; + int iTimeLimit; + double dTimeDown; + int iIgnorePrice; + + int.TryParse(tbCFListSize.Text, out iListSize); + double.TryParse(tbCFFastSD.Text, out dFastSD); + double.TryParse(tbCFFastUp.Text, out dFastUp); + double.TryParse(tbCFFastDown.Text, out dFastDown); + double.TryParse(tbCFSlowSD.Text, out dSlowSD); + double.TryParse(tbCFSlowUp.Text, out dSlowUp); + double.TryParse(tbCFSlowDown.Text, out dSlowDown); + int.TryParse(tbCFTimeLimit.Text, out iTimeLimit); + double.TryParse(tbCFTimeDown.Text, out dTimeDown); + int.TryParse(tbCFIgnorePrice.Text, out iIgnorePrice); + Config.SetVolatility(iListSize, dFastSD, dFastUp, dFastDown, dSlowSD, dSlowUp, dSlowDown, iTimeLimit, dTimeDown, iIgnorePrice); } #region Simulation diff --git a/Config.cs b/Config.cs index c75611c..56eadbd 100644 --- a/Config.cs +++ b/Config.cs @@ -22,6 +22,17 @@ namespace AutoSellerNS m_Data.Add("trailing-rate", 1.0f); m_Data.Add("trailing-count", 2); + m_Data.Add("list-size", 20); + m_Data.Add("fast-sd", 0.75); + m_Data.Add("fast-up", 0.05); + m_Data.Add("fast-down", 0.05); + m_Data.Add("slow-sd", 0.2); + m_Data.Add("slow-up", 0.4); + m_Data.Add("slow-down", 0.4); + m_Data.Add("time-limit", 5); + m_Data.Add("time-down", 0.02); + m_Data.Add("ignore-price", 50000); + Load(); } @@ -103,5 +114,35 @@ namespace AutoSellerNS { return (int)m_Data["trailing-count"]; } + + public static void SetVolatility(int iListSize, + double dFastSD, double dFastUp, double dFastDown, + double dSlowSD, double dSlowUp, double dSlowDown, + int iTimeLimit, double dTimeDown, + int iIgnorePrice) + { + m_Data["list-size"] = iListSize; + m_Data["fast-sd"] = dFastSD; + m_Data["fast-up"] = dFastUp; + m_Data["fast-down"] = dFastDown; + m_Data["slow-sd"] = dSlowSD; + m_Data["slow-up"] = dSlowUp; + m_Data["slow-down"] = dSlowDown; + m_Data["time-limit"] = iTimeLimit; + m_Data["time-down"] = dTimeDown; + m_Data["ignore-price"] = iIgnorePrice; + Save(); + } + + public static int GetListSize() { return (int)m_Data["list-size"]; } + public static double GetFastSD() { return (double)m_Data["fast-sd"]; } + public static double GetFastUp() { return (double)m_Data["fast-up"]; } + public static double GetFastDown() { return (double)m_Data["fast-down"]; } + public static double GetSlowSD() { return (double)m_Data["slow-sd"]; } + public static double GetSlowUp() { return (double)m_Data["slow-up"]; } + public static double GetSlowDown() { return (double)m_Data["slow-down"]; } + public static int GetTimeLimit() { return (int)m_Data["time-limit"]; } + public static double GetTimeDown() { return (double)m_Data["time-down"]; } + public static int GetIgnorePrice() { return (int)m_Data["ignore-price"]; } } } diff --git a/CybosHelper.cs b/CybosHelper.cs index 6096325..e98d4b6 100644 --- a/CybosHelper.cs +++ b/CybosHelper.cs @@ -31,21 +31,14 @@ namespace AutoSellerNS public List m_PriceList = new List(); public double m_dCheckCountLimit = 5; - double m_dFastSD = 0.75; - double m_dFastUpCnt = 0.05; - double m_dFastDownCnt = 0.05; - double m_dSlowSD = 0.2; - double m_dSlowUpCnt = 0.4; - double m_dSlowDownCnt = 0.4; - int m_iTimeLimit = 5; int m_iPrevTime = 0; - double m_dTimeSub = 0.02; public void OnRecievedPrice() { bool bReal = (m_StockCur.GetHeaderValue(19) == '2'); m_iCurPrice = m_StockCur.GetHeaderValue(13); - int iTime = m_StockCur.GetHeaderValue(18); // *** 초단위 시간 확인 + int iTime = m_StockCur.GetHeaderValue(18); + int iConclusionCnt = m_StockCur.GetHeaderValue(17); int iTimeDiff = 0; if(m_iPrevTime > 0) @@ -57,22 +50,22 @@ namespace AutoSellerNS double dAverage = (float)m_PriceList.Average(); double sumOfSquaresOfDifferences = m_PriceList.Select(val => Math.Pow((val-dAverage)/m_CybosHelper.GetUnitValue(val), 2)).Sum(); double dStdDev = Math.Sqrt(sumOfSquaresOfDifferences / m_PriceList.Count); - if(dStdDev >= m_dFastSD) + if(dStdDev >= Config.GetFastSD()) { if(m_iCurPrice >= dAverage) - m_dCheckCountLimit += m_dFastUpCnt; + m_dCheckCountLimit += Config.GetFastUp(); else - m_dCheckCountLimit -= m_dFastDownCnt; + m_dCheckCountLimit -= Config.GetFastDown(); } - else if(dStdDev <= m_dSlowSD) + else if(dStdDev <= Config.GetSlowSD()) { if(m_iCurPrice >= dAverage) - m_dCheckCountLimit += m_dSlowUpCnt; + m_dCheckCountLimit += Config.GetSlowUp(); else - m_dCheckCountLimit -= m_dSlowDownCnt; + m_dCheckCountLimit -= Config.GetSlowDown(); } - m_dCheckCountLimit -= iTimeDiff*m_dTimeSub; + m_dCheckCountLimit -= iTimeDiff*Config.GetTimeDown(); if(m_iCurPrice > m_iMaxPrice) @@ -83,10 +76,13 @@ namespace AutoSellerNS int iAskPrice = m_StockCur.GetHeaderValue(7); int iBidPrice = m_StockCur.GetHeaderValue(8); - if(m_iCurPrice <= iBidPrice) - m_iCheckCount++; - else - m_iCheckCount = 0; + if(m_iCurPrice*iConclusionCnt > Config.GetIgnorePrice()) + { + if(m_iCurPrice <= iBidPrice) + m_iCheckCount++; + else + m_iCheckCount = 0; + } if(m_iCheckCount >= m_dCheckCountLimit && m_Listener.IsSelling() == true) { @@ -111,7 +107,7 @@ namespace AutoSellerNS m_iMaxPrice)); } - if(iTimeDiff >= m_iTimeLimit) + if(iTimeDiff >= Config.GetTimeLimit()) { 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}원)", diff --git a/SimulationHelper.cs b/SimulationHelper.cs index 450d564..b87375e 100644 --- a/SimulationHelper.cs +++ b/SimulationHelper.cs @@ -449,6 +449,7 @@ namespace AutoSellerNS string strLine = (string)aParams[9]; double dTimeSub = (double)aParams[10]; int iTimeDiffLimit = (int)aParams[11]; + int iIgnorePrice = (int)aParams[12]; var tokens = strLine.Split('\t'); @@ -485,6 +486,7 @@ namespace AutoSellerNS int iTrailingCount = 0; int iMaxPrice = int.MinValue; + int iMaxPriceRow = 0; int iStockCount = 0; int iStartRow = 0; int iPrevPrice = 0; @@ -499,8 +501,16 @@ namespace AutoSellerNS Sheet.Cells[1, 9].Value = "표준편차"; Sheet.Cells[1, 10].Value = "매도 제한"; Sheet.Cells[1, 11].Value = "매도 수"; + Sheet.Cells[1, 12].Value = "시가 대비"; + int iFillColumns = 12; Sheet.View.FreezePanes(2, 1); + Color BidFontColor = Color.FromArgb(235, 0, 0); + Color BidBackColor = Color.FromArgb(249, 150, 150); + Color AskFontColor = Color.FromArgb(0, 91, 240); + Color AskBackColor = Color.FromArgb(127, 179, 243); + Color MaxBackColor = Color.FromArgb(91, 205, 102); + double dPrevStdDev = 0; string strReturnMsg = ""; int iPrevTime = 0; @@ -511,6 +521,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 iTimeDiff = 0; if(iPrevTime > 0) @@ -532,6 +543,15 @@ namespace AutoSellerNS { bStart = true; iStartRow = iRow; + iMaxPriceRow = iRow; + + iMaxPrice = iStartPrice; + + for(int i = 1; i<=iFillColumns; i++) + { + Sheet.Cells[iRow, i].Style.Fill.PatternType = OfficeOpenXml.Style.ExcelFillStyle.Solid; + Sheet.Cells[iRow, i].Style.Fill.BackgroundColor.SetColor(BidBackColor); + } m_PriceList.Clear(); m_PriceList.Add(iPrice); @@ -539,7 +559,7 @@ namespace AutoSellerNS else if((RowDT-StartDT).Minutes > 10) { InsertLog(string.Format("[{0}] [{1}] 매수 가격 찾기 실패\n", - StartDT.ToString("yyyy-MM-dd"), + StartDT.ToString("yyyy-MM-dd"), strCodeName)); break; } @@ -615,18 +635,26 @@ namespace AutoSellerNS Sheet.Cells[iRow, 9].Value = dStdDev; Sheet.Cells[iRow, 9].Style.Numberformat.Format = "0.00"; Sheet.Cells[iRow, 10].Value = dCheckCount; + float fProfitRate = (iPrice/(float)iStartPrice - 1.0f)*100; + Sheet.Cells[iRow, 12].Value = fProfitRate; + Sheet.Cells[iRow, 12].Style.Numberformat.Format = "0.00"; + Sheet.Cells[iRow, 12].Style.Font.Color.SetColor(fProfitRate > 0 ? BidFontColor : fProfitRate < 0 ? AskFontColor : Color.Black); // 호가 비교 - 매수호가 기준 - if(iPrice <= iBidPrice) + if(iPrice*iConclusionCnt > iIgnorePrice) { - iAskCount++; - Sheet.Cells[iRow, 7].Style.Font.Color.SetColor(Color.Blue); - } - else - { - iAskCount = 0; - Sheet.Cells[iRow, 7].Style.Font.Color.SetColor(Color.Red); + if(iPrice <= iBidPrice) + { + iAskCount++; + Sheet.Cells[iRow, 7].Style.Font.Color.SetColor(AskFontColor); + } + else + { + iAskCount = 0; + Sheet.Cells[iRow, 7].Style.Font.Color.SetColor(BidFontColor); + } } + Sheet.Cells[iRow, 11].Value = iAskCount; @@ -652,6 +680,14 @@ namespace AutoSellerNS dCheckCount ); + + for(int i = 1; i<=iFillColumns; i++) + { + Sheet.Cells[iRow, i].Style.Fill.PatternType = OfficeOpenXml.Style.ExcelFillStyle.Solid; + Sheet.Cells[iRow, i].Style.Fill.BackgroundColor.SetColor(AskBackColor); + } + + break; } @@ -659,7 +695,12 @@ namespace AutoSellerNS iTrailingCount = 0; else if(iPrice <= iMaxPrice*(100-Config.GetTrailingRate())/100) iTrailingCount++; - iMaxPrice = Math.Max(iPrice, iMaxPrice); + + if(iPrice > iMaxPrice) + { + iMaxPrice = iPrice; + iMaxPriceRow = iRow; + } if(iTrailingCount >= Config.GetTrailingCnt()) { @@ -685,6 +726,12 @@ namespace AutoSellerNS ); + for(int i = 1; i<=iFillColumns; i++) + { + Sheet.Cells[iRow, i].Style.Fill.PatternType = OfficeOpenXml.Style.ExcelFillStyle.Solid; + Sheet.Cells[iRow, i].Style.Fill.BackgroundColor.SetColor(AskBackColor); + } + break; } @@ -712,6 +759,12 @@ namespace AutoSellerNS ); + for(int i = 1; i<=iFillColumns; i++) + { + Sheet.Cells[iRow, i].Style.Fill.PatternType = OfficeOpenXml.Style.ExcelFillStyle.Solid; + Sheet.Cells[iRow, i].Style.Fill.BackgroundColor.SetColor(AskBackColor); + } + break; } @@ -742,6 +795,12 @@ namespace AutoSellerNS ); + for(int i = 1; i<=iFillColumns; i++) + { + Sheet.Cells[iRow, i].Style.Fill.PatternType = OfficeOpenXml.Style.ExcelFillStyle.Solid; + Sheet.Cells[iRow, i].Style.Fill.BackgroundColor.SetColor(AskBackColor); + } + break; } @@ -749,6 +808,15 @@ namespace AutoSellerNS iPrevTime = iTime; } + if(iStartRow > 0) + { + for(int i = 1; i<=iFillColumns; i++) + { + Sheet.Cells[iMaxPriceRow, i].Style.Fill.PatternType = OfficeOpenXml.Style.ExcelFillStyle.Solid; + Sheet.Cells[iMaxPriceRow, i].Style.Fill.BackgroundColor.SetColor(MaxBackColor); + } + } + Sheet.Cells.AutoFitColumns(0); Sheet.Select(ExcelAddress.GetAddress(Math.Max(iStartRow, 1), 1), true); @@ -772,11 +840,12 @@ namespace AutoSellerNS string strMethod = (string)aParams[8]; double dTimeSub = (double)aParams[9]; int iTimeDiffLimit = (int)aParams[10]; + int iIgnorePrice = (int)aParams[11]; - InsertLog(string.Format("[시뮬레이션 시작] 조건 : {0}회, 트레일링 : {1}%, {2}회\n \t\t리스트 크기:{3}, Fast : {4}, {5}, {6}, Slow : {7}, {8}, {9}, 초당 {10} 감소, 제한 시간: {11} 비교 방식 : {12}\n", + InsertLog(string.Format("[시뮬레이션 시작] 조건 : {0}회, 트레일링 : {1}%, {2}회\n \t\t리스트 크기:{3}, Fast : {4}, {5}, {6}, Slow : {7}, {8}, {9}, 초당 {10} 감소, 제한 시간: {11}, {12}원 이하 무시, 비교 방식 : {13}\n", Config.GetBidCount(), Config.GetTrailingRate(), Config.GetTrailingCnt(), iListCnt, dFastSD, dFastUpCnt, dFastDownCnt, dSlowSD, dSlowUpCnt, dSlowDownCnt, - dTimeSub, iTimeDiffLimit, + dTimeSub, iTimeDiffLimit, iIgnorePrice, strMethod )); @@ -791,7 +860,8 @@ namespace AutoSellerNS dFastSD, dFastUpCnt, dFastDownCnt, dSlowSD, dSlowUpCnt, dSlowDownCnt, iCompareType, strMethod, - strLine, dTimeSub, iTimeDiffLimit })); + strLine, dTimeSub, iTimeDiffLimit, + iIgnorePrice })); aTasks.Add(task); } @@ -820,6 +890,7 @@ namespace AutoSellerNS double dSlowDownCnt; double dTimeSub; int iTimeDiffLimit; + int iIgnorePrice; int.TryParse(m_AutoSeller.tbSMListSize.Text, out iListCnt); double.TryParse(m_AutoSeller.tbSMFastSD.Text, out dFastSD); @@ -830,6 +901,7 @@ namespace AutoSellerNS double.TryParse(m_AutoSeller.tbSMSlowDownCnt.Text, out dSlowDownCnt); double.TryParse(m_AutoSeller.tbSMTimeSub.Text, out dTimeSub); int.TryParse(m_AutoSeller.tbSMTimeDiffLimit.Text, out iTimeDiffLimit); + int.TryParse(m_AutoSeller.tbSMIgnorePrice.Text, out iIgnorePrice); string strMethod = ""; m_AutoSeller.cbSMMethod.Invoke(new Action(() => { @@ -858,7 +930,8 @@ namespace AutoSellerNS iListCnt, dFastSD, dFastUpCnt, dFastDownCnt, dSlowSD, dSlowUpCnt, dSlowDownCnt, - iCompareType, strMethod, dTimeSub, iTimeDiffLimit + iCompareType, strMethod, dTimeSub, iTimeDiffLimit, + iIgnorePrice }); // } // }