trace 정리
This commit is contained in:
33
MainForm.cs
33
MainForm.cs
@@ -38,7 +38,7 @@ namespace upper_limit_crawler
|
||||
|
||||
SetDoubleBuffered(tbLog);
|
||||
|
||||
UlUtil.Init(tbLog);
|
||||
ULUtil.Init(tbLog);
|
||||
|
||||
btApply_Click(null, null);
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace upper_limit_crawler
|
||||
m_MainTimer.Tick += Refresh;
|
||||
m_MainTimer.Start();
|
||||
|
||||
UlUtil.Trace("시작");
|
||||
ULUtil.Trace("시작");
|
||||
}
|
||||
|
||||
public static void SetDoubleBuffered(Control control)
|
||||
@@ -69,7 +69,7 @@ namespace upper_limit_crawler
|
||||
|
||||
private bool IsOnTime()
|
||||
{
|
||||
DateTime CurTime = UlUtil.GetCurTime();
|
||||
DateTime CurTime = ULUtil.GetCurTime();
|
||||
if (CurTime.DayOfWeek == DayOfWeek.Sunday || CurTime.DayOfWeek == DayOfWeek.Saturday)
|
||||
return false;
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace upper_limit_crawler
|
||||
return;
|
||||
}
|
||||
|
||||
if(cbStart.Checked == true && UlUtil.IsConnected() == false)
|
||||
if(cbStart.Checked == true && ULUtil.IsConnected() == false)
|
||||
{
|
||||
cbStart.Checked = false;
|
||||
return;
|
||||
@@ -107,10 +107,10 @@ namespace upper_limit_crawler
|
||||
|
||||
m_Own.Refresh(iCurTime);
|
||||
|
||||
lbRQCnt.Text = "RQ Count : " + UlUtil.GetLimitRemainCountRQ().ToString();
|
||||
lbSBCnt.Text = "SB Count : " + UlUtil.GetLimitRemainCountSB().ToString();
|
||||
lbRQCnt.Text = "RQ Count : " + ULUtil.GetLimitRemainCountRQ().ToString();
|
||||
lbSBCnt.Text = "SB Count : " + ULUtil.GetLimitRemainCountSB().ToString();
|
||||
|
||||
statusBar1.Panels[1].Text = UlUtil.GetCurTimeString() + " ";
|
||||
statusBar1.Panels[1].Text = ULUtil.GetCurTimeString() + " ";
|
||||
|
||||
m_iLastTime = iCurTime;
|
||||
}
|
||||
@@ -133,10 +133,10 @@ namespace upper_limit_crawler
|
||||
{
|
||||
if (cbStart.Checked == true)
|
||||
{
|
||||
if (UlUtil.IsConnected() == false)
|
||||
UlUtil.Reset();
|
||||
if (ULUtil.IsConnected() == false)
|
||||
ULUtil.Reset();
|
||||
|
||||
if (UlUtil.IsConnected() == false)
|
||||
if (ULUtil.IsConnected() == false)
|
||||
{
|
||||
cbStart.Checked = false;
|
||||
MessageBox.Show("Cybos Plus를 실행해주세요");
|
||||
@@ -177,7 +177,7 @@ namespace upper_limit_crawler
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
UlUtil.Trace(ex.ToString());
|
||||
ULUtil.Trace(ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ namespace upper_limit_crawler
|
||||
|
||||
private void btTimeSync_Click(object sender, EventArgs e)
|
||||
{
|
||||
UlUtil.SyncServerTime();
|
||||
ULUtil.SyncServerTime();
|
||||
}
|
||||
|
||||
DSCBO1Lib.StockCur cur = new DSCBO1Lib.StockCur();
|
||||
@@ -359,19 +359,21 @@ namespace upper_limit_crawler
|
||||
{
|
||||
if (m_DataMgr.IsInBlackList(iTime, strCode) == true)
|
||||
{
|
||||
//UlUtil.Trace(string.Format("[{0}] 조건 매수 실패. black list {1}원 ({2})", item.m_strCodeName, item.m_iCurPrice, fCompRate.ToString("0.00%")));
|
||||
//Console.WriteLine("[{0}] 조건 매수 실패. black list {1}원 ({2})", item.m_strCodeName, item.m_iCurPrice, fCompRate.ToString("0.00%"));
|
||||
continue;
|
||||
}
|
||||
|
||||
float f5MASlope = item.GetPrev5MASlope(iTime);
|
||||
if (f5MASlope <= 0)
|
||||
{
|
||||
//UlUtil.Trace(string.Format("[{0}] 조건 매수 실패. 5ma 상승하지 않음 {1}원 ({2})", item.m_strCodeName, item.m_iCurPrice, fCompRate.ToString("0.00%")));
|
||||
//Console.WriteLine("[{0}] 조건 매수 실패. 5ma 상승하지 않음 {1}원 ({2})", item.m_strCodeName, item.m_iCurPrice, fCompRate.ToString("0.00%"));
|
||||
continue;
|
||||
}
|
||||
|
||||
// bid and add to black list
|
||||
Console.WriteLine(string.Format("[{0}] [{1}] 조건 매수 {2}원 ({3}) (5MA slop:{4:0.00})", iTime, item.m_strCodeName, item.m_iCurPrice, fCompRate.ToString("0.00%"), f5MASlope));
|
||||
ULUtil.TraceCSV("조건 매수", item.m_strCodeName, item.m_iCurPrice, fCompRate.ToString("0.00%"), f5MASlope);
|
||||
|
||||
OwnItem.m_iUnitBEP = iCurPrice;
|
||||
OwnItem.m_strCodeName = item.m_strCodeName;
|
||||
|
||||
@@ -386,6 +388,7 @@ namespace upper_limit_crawler
|
||||
if (iCurPrice <= OwnItem.m_iUnitBEP * (1.0f - m_DataMgr.m_Setting.m_fLossCut))
|
||||
{
|
||||
Console.WriteLine(string.Format("[{0}] [{1}] 손절 {2}원 ({3}:{4})", iTime, OwnItem.m_strCodeName, iCurPrice, iCurPrice - OwnItem.m_iUnitBEP, (iCurPrice / (float)OwnItem.m_iUnitBEP - 1.0f).ToString("0.00%")));
|
||||
ULUtil.TraceCSV("손절", OwnItem.m_strCodeName, iCurPrice, (iCurPrice / (float)OwnItem.m_iUnitBEP - 1.0f).ToString("0.00%"));
|
||||
OwnItem.m_iUnitBEP = 0;
|
||||
|
||||
//m_DataMgr.GetTrader().SellCurPrice(OwnItem.m_strCode, OwnItem.m_iPayBalance);
|
||||
@@ -407,6 +410,8 @@ namespace upper_limit_crawler
|
||||
}
|
||||
|
||||
Console.WriteLine(string.Format("[{0}] [{1}] 트레일링 매도 {2}원 ({3}:{4}) (5MA slop:{5:0.00})", iTime, OwnItem.m_strCodeName, iCurPrice, iCurPrice- OwnItem.m_iUnitBEP, (iCurPrice / (float)OwnItem.m_iUnitBEP - 1.0f).ToString("0.00%"), f5MASlope));
|
||||
ULUtil.TraceCSV("트레일링 매도", OwnItem.m_strCodeName, iCurPrice, iCurPrice - OwnItem.m_iUnitBEP, (iCurPrice / (float)OwnItem.m_iUnitBEP - 1.0f).ToString("0.00%"), f5MASlope);
|
||||
|
||||
OwnItem.m_iUnitBEP = 0;
|
||||
|
||||
//m_DataMgr.GetTrader().SellCurPrice(OwnItem.m_strCode, OwnItem.m_iPayBalance);
|
||||
|
||||
Reference in New Issue
Block a user