From 76e94dd4fc8d9acee78c48d8442d8004d768b551 Mon Sep 17 00:00:00 2001 From: mjjo Date: Thu, 28 Jul 2016 21:56:31 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B2=B4=EA=B2=B0=EB=90=98=EB=A9=B4=20balance?= =?UTF-8?q?=20=EA=B0=B1=EC=8B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ULBalanceDlg.cs | 5 ++++- ULTrader.cs | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ULBalanceDlg.cs b/ULBalanceDlg.cs index 36cc68e..8949638 100644 --- a/ULBalanceDlg.cs +++ b/ULBalanceDlg.cs @@ -159,6 +159,7 @@ namespace upper_limit_crawler foreach (ListViewItem lvItem in lvBalance.Items) { string strCode = lvItem.SubItems[chCode.Index].Text; + if (WatchList.ContainsKey(strCode) == true) { ULWatchItem WatchItem = WatchList[strCode]; @@ -251,10 +252,12 @@ namespace upper_limit_crawler int iDeltaT = iCurTime-m_iLastTime; m_iBalanceDelay-=iDeltaT; - if(m_iBalanceDelay<=0 && ULUtil.GetLimitRemainCountRQ() > 20) + if((m_DataMgr.GetTrader().HasConclusion() == true || m_iBalanceDelay<=0) + && ULUtil.GetLimitRemainCountRQ() > 20) { RefreshBalance(); m_iBalanceDelay=BALANCE_DELAY; + m_DataMgr.GetTrader().ResetConclusion(); } RefreshCurPrice(); diff --git a/ULTrader.cs b/ULTrader.cs index cc143e2..5cc5b06 100644 --- a/ULTrader.cs +++ b/ULTrader.cs @@ -16,6 +16,8 @@ namespace upper_limit_crawler object lockBuy = new object(); object lockSell = new object(); + bool m_bHasConclusion = false; + public ULTrader() { } @@ -83,6 +85,20 @@ namespace upper_limit_crawler ULUtil.Trace(strLog); + + + if (strResult == "1") + m_bHasConclusion = true; + } + + public bool HasConclusion() + { + return m_bHasConclusion; + } + + public void ResetConclusion() + { + m_bHasConclusion = false; } //0 - (string)주문종류코드 주문구분