- ULWatchItem.Is5MAGoingUp() 함수 추가
- ULWatchItem.FillPrice() 함수 추가
This commit is contained in:
60
ULDataMgr.cs
60
ULDataMgr.cs
@@ -9,25 +9,25 @@ using System.Threading.Tasks;
|
||||
namespace upper_limit_crawler
|
||||
{
|
||||
public struct SETTING
|
||||
{
|
||||
public float m_fSearchMin;
|
||||
public float m_fSearchMax;
|
||||
public float m_fBidMin;
|
||||
{
|
||||
public float m_fSearchMin;
|
||||
public float m_fSearchMax;
|
||||
public float m_fBidMin;
|
||||
public float m_fBidMax;
|
||||
public float m_fBidAmount;
|
||||
public float m_fTimeout;
|
||||
public float m_fTrailing;
|
||||
public float m_fLossCut;
|
||||
}
|
||||
public float m_fTimeout;
|
||||
public float m_fTrailing;
|
||||
public float m_fLossCut;
|
||||
}
|
||||
|
||||
public class ULDataMgr
|
||||
{
|
||||
public SETTING m_Setting = new SETTING();
|
||||
public SETTING m_Setting = new SETTING();
|
||||
|
||||
ULTrader m_Trader = new ULTrader();
|
||||
ULTrader m_Trader = new ULTrader();
|
||||
|
||||
Dictionary<string, ULWatchItem> m_WatchList = new Dictionary<string, ULWatchItem>();
|
||||
List<string> m_BlackList = new List<string>();
|
||||
List<string> m_BlackList = new List<string>();
|
||||
|
||||
public ULDataMgr()
|
||||
{
|
||||
@@ -48,7 +48,7 @@ namespace upper_limit_crawler
|
||||
return m_Trader;
|
||||
}
|
||||
|
||||
public void AddWatch(string strCode, string strCodeName, int iCurPrice, int iPrevClosing)
|
||||
public void AddWatch(string strCode, string strCodeName, int iCurPrice, int iPrevClosing)
|
||||
{
|
||||
if (m_WatchList.ContainsKey(strCode))
|
||||
return;
|
||||
@@ -59,6 +59,8 @@ namespace upper_limit_crawler
|
||||
item.m_iCurPrice = iCurPrice;
|
||||
item.m_iPrevClosing = iPrevClosing;
|
||||
|
||||
item.FillPrice();
|
||||
|
||||
item.m_StockCur = new DSCBO1Lib.StockCur();
|
||||
item.m_StockCur.SetInputValue(0, strCode);
|
||||
item.m_StockCur.Received += item.Received;
|
||||
@@ -76,24 +78,24 @@ namespace upper_limit_crawler
|
||||
m_WatchList.Remove(strCode);
|
||||
}
|
||||
|
||||
public void StartAll()
|
||||
{
|
||||
foreach (KeyValuePair<string, ULWatchItem> item in m_WatchList)
|
||||
{
|
||||
item.Value.m_StockCur = new DSCBO1Lib.StockCur();
|
||||
item.Value.m_StockCur.SetInputValue(0, item.Value.m_strCode);
|
||||
item.Value.m_StockCur.Received += item.Value.Received;
|
||||
item.Value.m_StockCur.SubscribeLatest();
|
||||
}
|
||||
}
|
||||
public void StartAll()
|
||||
{
|
||||
foreach (KeyValuePair<string, ULWatchItem> item in m_WatchList)
|
||||
{
|
||||
item.Value.m_StockCur = new DSCBO1Lib.StockCur();
|
||||
item.Value.m_StockCur.SetInputValue(0, item.Value.m_strCode);
|
||||
item.Value.m_StockCur.Received += item.Value.Received;
|
||||
item.Value.m_StockCur.SubscribeLatest();
|
||||
}
|
||||
}
|
||||
|
||||
public void StopAll()
|
||||
{
|
||||
foreach (KeyValuePair<string, ULWatchItem> item in m_WatchList)
|
||||
{
|
||||
item.Value.m_StockCur.Unsubscribe();
|
||||
}
|
||||
}
|
||||
public void StopAll()
|
||||
{
|
||||
foreach (KeyValuePair<string, ULWatchItem> item in m_WatchList)
|
||||
{
|
||||
item.Value.m_StockCur.Unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
public void AddBlackList(string strCode)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user