- 시간에 따른 감소폭 추가
- 정정주문 수정 - crash 수정
This commit is contained in:
@@ -104,13 +104,25 @@ namespace AutoSellerNS
|
||||
|
||||
private void Timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
foreach(var NCItem in m_NCItems)
|
||||
if(m_bSell == false)
|
||||
return;
|
||||
|
||||
lock(m_NCItems)
|
||||
{
|
||||
if(NCItem.m_bAsk == true && DateTime.Now-NCItem.m_Time >= TimeSpan.FromSeconds(3))
|
||||
var NCList = m_NCItems;
|
||||
foreach(var NCItem in NCList)
|
||||
{
|
||||
m_CybosHelper.CorrectionItem(NCItem.m_strCode, NCItem.m_iOrgOrderNo, m_CybosHelper.GetItem(NCItem.m_strCode).m_aiAskPrice[0]);
|
||||
NCItem.m_Time = DateTime.Now;
|
||||
Util.Log(Util.LOG_TYPE.SELL, string.Format("[{0}] 정정 주문", NCItem.m_strCodeName));
|
||||
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;
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -169,6 +181,7 @@ namespace AutoSellerNS
|
||||
string.Format("{0:n0}", Item.m_iValuationGains),
|
||||
string.Format("{0:n2}", Item.m_dYield),
|
||||
ItemCur != null ? string.Format("{0:n0}", ItemCur.m_iMaxPrice) : "",
|
||||
ItemCur != null ? string.Format("{0:n2}", ItemCur.m_dCheckCountLimit) : "",
|
||||
ItemCur != null ? string.Format("{0:n0}", ItemCur.m_iCheckCount) : "",
|
||||
}));
|
||||
|
||||
@@ -196,6 +209,7 @@ namespace AutoSellerNS
|
||||
string.Format("{0:n0}", Item.m_iValuationGains),
|
||||
string.Format("{0:n2}", Item.m_dYield),
|
||||
ItemCur != null ? string.Format("{0:n0}", ItemCur.m_iMaxPrice) : "",
|
||||
ItemCur != null ? string.Format("{0:n2}", ItemCur.m_dCheckCountLimit) : "",
|
||||
ItemCur != null ? string.Format("{0:n0}", ItemCur.m_iCheckCount) : "",
|
||||
}));
|
||||
|
||||
@@ -315,7 +329,7 @@ namespace AutoSellerNS
|
||||
return m_bSell;
|
||||
}
|
||||
|
||||
public void OnReceivedCurPrice(string strCode, int iPrice, int iMaxPrice, int iCheckCount, bool bReal)
|
||||
public void OnReceivedCurPrice(string strCode, int iPrice, int iMaxPrice, double dCheckCountLimit, int iCheckCount, bool bReal)
|
||||
{
|
||||
ITEM Item = m_Items.FirstOrDefault(s => s.m_strCode == strCode);
|
||||
if (Item == default(ITEM))
|
||||
@@ -337,6 +351,7 @@ namespace AutoSellerNS
|
||||
row.SubItems[chAssessedValue.Index].Text = string.Format("{0:n0}", Item.m_iAssessedValue);
|
||||
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);
|
||||
row.SubItems[chCheckCount.Index].Text = string.Format("{0:n0}", iCheckCount);
|
||||
}));
|
||||
}
|
||||
@@ -350,6 +365,7 @@ namespace AutoSellerNS
|
||||
row.SubItems[chAssessedValue.Index].Text = string.Format("{0:n0}", Item.m_iAssessedValue);
|
||||
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);
|
||||
row.SubItems[chCheckCount.Index].Text = string.Format("{0:n0}", iCheckCount);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user