모의 투자가 아닐 경우 IOC 매수
This commit is contained in:
@@ -193,7 +193,6 @@ namespace NewsCrawler
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
int iCurPrice = GetCurPrice(Code);
|
||||
int iCallValue = GetCallUnitValue((int)(iCurPrice*1.015));
|
||||
int iCount = iMaxPrice/iCallValue;
|
||||
@@ -204,11 +203,26 @@ namespace NewsCrawler
|
||||
m_CP0311.SetInputValue(3, Code.m_strCode);
|
||||
m_CP0311.SetInputValue(4, iCount);
|
||||
m_CP0311.SetInputValue(5, iCallValue);
|
||||
m_CP0311.SetInputValue(7, "01");
|
||||
if(Config.GetMockTrading() == false)
|
||||
m_CP0311.SetInputValue(7, "1");
|
||||
m_CP0311.SetInputValue(8, "01");
|
||||
m_CP0311.BlockRequest2(1);
|
||||
|
||||
Util.Log(Util.LOG_TYPE.BUY, string.Format("code:{0} {1}주 현재가 {2}원, 지정가 {3} IOC 매수", Code.ToString(), iCount, iCurPrice, iCallValue));
|
||||
|
||||
|
||||
string OrderCondition = m_CP0311.GetHeaderValue(12);
|
||||
if (OrderCondition == "0")
|
||||
OrderCondition = "조건 없음";
|
||||
else if (OrderCondition == "1")
|
||||
OrderCondition = "IOC";
|
||||
else if (OrderCondition == "2")
|
||||
OrderCondition = "FOK";
|
||||
else
|
||||
OrderCondition = "조건 오류";
|
||||
|
||||
Console.WriteLine(OrderCondition);
|
||||
|
||||
Util.Log(Util.LOG_TYPE.BUY, string.Format("code:{0} {1}주 현재가 {2}원, 지정가 {3} : {4}", Code.ToString(), iCount, iCurPrice, iCallValue, OrderCondition));
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user