로그 수정
기본 파라미터 변경 watch 삭제
This commit is contained in:
4
MainForm.Designer.cs
generated
4
MainForm.Designer.cs
generated
@@ -158,7 +158,7 @@
|
|||||||
this.tbTrailing.Name = "tbTrailing";
|
this.tbTrailing.Name = "tbTrailing";
|
||||||
this.tbTrailing.Size = new System.Drawing.Size(100, 21);
|
this.tbTrailing.Size = new System.Drawing.Size(100, 21);
|
||||||
this.tbTrailing.TabIndex = 10;
|
this.tbTrailing.TabIndex = 10;
|
||||||
this.tbTrailing.Text = "1.0%";
|
this.tbTrailing.Text = "3.0%";
|
||||||
this.tbTrailing.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
this.tbTrailing.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||||
//
|
//
|
||||||
// label5
|
// label5
|
||||||
@@ -176,7 +176,7 @@
|
|||||||
this.tbLossCut.Name = "tbLossCut";
|
this.tbLossCut.Name = "tbLossCut";
|
||||||
this.tbLossCut.Size = new System.Drawing.Size(100, 21);
|
this.tbLossCut.Size = new System.Drawing.Size(100, 21);
|
||||||
this.tbLossCut.TabIndex = 10;
|
this.tbLossCut.TabIndex = 10;
|
||||||
this.tbLossCut.Text = "2.0%";
|
this.tbLossCut.Text = "3.0%";
|
||||||
this.tbLossCut.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
this.tbLossCut.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||||
//
|
//
|
||||||
// label6
|
// label6
|
||||||
|
|||||||
@@ -192,18 +192,22 @@ namespace upper_limit_crawler
|
|||||||
// loss cut
|
// loss cut
|
||||||
if (iCurPrice <= OwnItem.m_iUnitBEP * (1.0f - m_DataMgr.m_Setting.m_fLossCut))
|
if (iCurPrice <= OwnItem.m_iUnitBEP * (1.0f - m_DataMgr.m_Setting.m_fLossCut))
|
||||||
{
|
{
|
||||||
UlUtil.Trace(string.Format("[{0}] 손절({1})", OwnItem.m_strCodeName, iCurPrice));
|
UlUtil.Trace(string.Format("[{0}] 손절 {1}원 ({2})", OwnItem.m_strCodeName, iCurPrice, (iCurPrice/OwnItem.m_iUnitBEP-1.0f).ToString("0.00%")));
|
||||||
m_DataMgr.GetTrader().SellCurPrice(OwnItem.m_strCode, OwnItem.m_iPayBalance);
|
m_DataMgr.GetTrader().SellCurPrice(OwnItem.m_strCode, OwnItem.m_iPayBalance);
|
||||||
m_OwnList.Remove(OwnItem);
|
m_OwnList.Remove(OwnItem);
|
||||||
|
m_DataMgr.RemoveWatch(strCode);
|
||||||
|
|
||||||
|
// own에서 삭제하고 미체결 리스트에 넣고, watch에서도 뺀다
|
||||||
|
|
||||||
// 미체결 잔량 취소
|
// 미체결 잔량 취소
|
||||||
}
|
}
|
||||||
// trailing
|
// trailing
|
||||||
else if (iCurPrice <= OwnItem.m_iMaxPrice - OwnItem.m_iUnitBEP * m_DataMgr.m_Setting.m_fTrailing)
|
else if (iCurPrice <= OwnItem.m_iMaxPrice - OwnItem.m_iUnitBEP * m_DataMgr.m_Setting.m_fTrailing)
|
||||||
{
|
{
|
||||||
UlUtil.Trace(string.Format("[{0}] 트레일링 매도({1})", OwnItem.m_strCodeName, iCurPrice));
|
UlUtil.Trace(string.Format("[{0}] 트레일링 매도 {1}원 ({2})", OwnItem.m_strCodeName, iCurPrice, (iCurPrice/OwnItem.m_iUnitBEP-1.0f).ToString("0.00%")));
|
||||||
m_DataMgr.GetTrader().SellCurPrice(OwnItem.m_strCode, OwnItem.m_iPayBalance);
|
m_DataMgr.GetTrader().SellCurPrice(OwnItem.m_strCode, OwnItem.m_iPayBalance);
|
||||||
m_OwnList.Remove(OwnItem);
|
m_OwnList.Remove(OwnItem);
|
||||||
|
m_DataMgr.RemoveWatch(strCode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,15 @@ namespace upper_limit_crawler
|
|||||||
m_WatchList.Add(strCode, item);
|
m_WatchList.Add(strCode, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RemoveWatch(string strCode)
|
||||||
|
{
|
||||||
|
if (m_WatchList.ContainsKey(strCode))
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_WatchList[strCode].m_StockCur.Unsubscribe();
|
||||||
|
m_WatchList.Remove(strCode);
|
||||||
|
}
|
||||||
|
|
||||||
public void AddBlackList(string strCode)
|
public void AddBlackList(string strCode)
|
||||||
{
|
{
|
||||||
m_BlackList.Add(strCode);
|
m_BlackList.Add(strCode);
|
||||||
|
|||||||
Reference in New Issue
Block a user