체결되면 balance 갱신
This commit is contained in:
@@ -159,6 +159,7 @@ namespace upper_limit_crawler
|
|||||||
foreach (ListViewItem lvItem in lvBalance.Items)
|
foreach (ListViewItem lvItem in lvBalance.Items)
|
||||||
{
|
{
|
||||||
string strCode = lvItem.SubItems[chCode.Index].Text;
|
string strCode = lvItem.SubItems[chCode.Index].Text;
|
||||||
|
|
||||||
if (WatchList.ContainsKey(strCode) == true)
|
if (WatchList.ContainsKey(strCode) == true)
|
||||||
{
|
{
|
||||||
ULWatchItem WatchItem = WatchList[strCode];
|
ULWatchItem WatchItem = WatchList[strCode];
|
||||||
@@ -251,10 +252,12 @@ namespace upper_limit_crawler
|
|||||||
|
|
||||||
int iDeltaT = iCurTime-m_iLastTime;
|
int iDeltaT = iCurTime-m_iLastTime;
|
||||||
m_iBalanceDelay-=iDeltaT;
|
m_iBalanceDelay-=iDeltaT;
|
||||||
if(m_iBalanceDelay<=0 && ULUtil.GetLimitRemainCountRQ() > 20)
|
if((m_DataMgr.GetTrader().HasConclusion() == true || m_iBalanceDelay<=0)
|
||||||
|
&& ULUtil.GetLimitRemainCountRQ() > 20)
|
||||||
{
|
{
|
||||||
RefreshBalance();
|
RefreshBalance();
|
||||||
m_iBalanceDelay=BALANCE_DELAY;
|
m_iBalanceDelay=BALANCE_DELAY;
|
||||||
|
m_DataMgr.GetTrader().ResetConclusion();
|
||||||
}
|
}
|
||||||
|
|
||||||
RefreshCurPrice();
|
RefreshCurPrice();
|
||||||
|
|||||||
16
ULTrader.cs
16
ULTrader.cs
@@ -16,6 +16,8 @@ namespace upper_limit_crawler
|
|||||||
object lockBuy = new object();
|
object lockBuy = new object();
|
||||||
object lockSell = new object();
|
object lockSell = new object();
|
||||||
|
|
||||||
|
bool m_bHasConclusion = false;
|
||||||
|
|
||||||
public ULTrader()
|
public ULTrader()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -83,6 +85,20 @@ namespace upper_limit_crawler
|
|||||||
|
|
||||||
|
|
||||||
ULUtil.Trace(strLog);
|
ULUtil.Trace(strLog);
|
||||||
|
|
||||||
|
|
||||||
|
if (strResult == "1")
|
||||||
|
m_bHasConclusion = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool HasConclusion()
|
||||||
|
{
|
||||||
|
return m_bHasConclusion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ResetConclusion()
|
||||||
|
{
|
||||||
|
m_bHasConclusion = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//0 - (string)주문종류코드 주문구분
|
//0 - (string)주문종류코드 주문구분
|
||||||
|
|||||||
Reference in New Issue
Block a user