- 5MA 계산 버그 수정
- 매수, 매도 조건 수정 : 5MA slope 조건 추가 - 기본 파라미터 수정
This commit is contained in:
@@ -160,14 +160,18 @@ namespace upper_limit_crawler
|
||||
if (fCompRate >= m_DataMgr.m_Setting.m_fBidMin && fCompRate <= m_DataMgr.m_Setting.m_fBidMax)
|
||||
{
|
||||
int iTime = ULUtil.GetCurTimeInt();
|
||||
if (m_DataMgr.IsInBlackList(iTime, strCode) == true)
|
||||
if (m_DataMgr.IsInPostponeList(iTime, strCode) == true)
|
||||
{
|
||||
//ULUtil.Trace("[{0}] 조건 매수 실패. black list {1}원 ({2})", item.m_strCodeName, item.m_iCurPrice, fCompRate.ToString("0.00%"));
|
||||
continue;
|
||||
}
|
||||
else if(m_DataMgr.IsInBlackList(strCode) == true)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
float f5MASlope = item.GetPrev5MASlope(iTime);
|
||||
if (f5MASlope <= 0)
|
||||
if(float.IsNaN(f5MASlope) || f5MASlope < 0.002f)
|
||||
{
|
||||
//ULUtil.Trace("[{0}] 조건 매수 실패. 5ma 상승하지 않음 {1}원 ({2})", item.m_strCodeName, item.m_iCurPrice, fCompRate.ToString("0.00%"));
|
||||
continue;
|
||||
@@ -175,16 +179,16 @@ namespace upper_limit_crawler
|
||||
|
||||
// bid and add to black list
|
||||
m_DataMgr.GetTrader().Buy(strCode, item.m_iCurPrice, (int)m_DataMgr.m_Setting.m_fBidAmount);
|
||||
m_DataMgr.AddBlackList(iTime, strCode);
|
||||
m_DataMgr.AddPostphoneItem(iTime, strCode);
|
||||
|
||||
|
||||
ULUtil.Trace("[{0}] 조건 매수 {1}원 ({2}) (5MA slop:{3:0.00})",
|
||||
ULUtil.Trace("[{0}] 조건 매수 {1}원 ({2}) (5MA slop:{3})",
|
||||
item.m_strCodeName,
|
||||
item.m_iCurPrice,
|
||||
fCompRate.ToString("0.00%"),
|
||||
f5MASlope);
|
||||
f5MASlope.ToString("0.00%"));
|
||||
|
||||
ULUtil.TraceCSV("조건 매수", item.m_strCodeName, item.m_iCurPrice, fCompRate.ToString("0.00%"), f5MASlope);
|
||||
ULUtil.TraceCSV("조건 매수", item.m_strCodeName, item.m_iCurPrice, fCompRate.ToString("0.00%"), f5MASlope.ToString("0.00%"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user