Hunter 시간대 관련 수정완료

This commit is contained in:
kyh
2023-07-11 09:29:59 +09:00
parent 10c95ba0a0
commit 07568b3d4c
3 changed files with 21 additions and 7 deletions

View File

@@ -352,8 +352,8 @@ namespace Million
var dic = new Dictionary<string, List<SearchResult>>();
Parallel.For(0, tableList.Count, i =>
{
// for (var i = 0; i < tableList.Count; i++)
//{
// for (var i = 0; i < tableList.Count; i++)
//{
var market = tableList[i];
var distinctIndicator = IndicatorSetupManager.Distinct(totalIndicator);
@@ -369,7 +369,7 @@ namespace Million
market, distinctIndicator, overlapBuyManagementList, buyScript, sellScript, sellExceptionScript);
dic[market.CoinFullName] = list;
}
//}
//}
});
foreach (var item in dic.Keys)

View File

@@ -68,7 +68,12 @@ namespace Million
POST = 0,
GET = 1
}
public enum ExchangeTime
{
UpbitorBithumb = 9
}
// 거래소 타입
public enum ExchangePlace
{

View File

@@ -242,10 +242,16 @@ namespace Million.Manager
}
else if (timeFlag == "hour")
{
var hour = firstData.DateTime.Hour / timeFlagValue * timeFlagValue;
var tempDateTime = firstData.DateTime;
tempDateTime = tempDateTime.AddHours(((int)CommonProperty.ExchangeTime.UpbitorBithumb * -1));
var hour = tempDateTime.Hour / timeFlagValue * timeFlagValue;
var dateTime = new DateTime(firstData.DateTime.Year, firstData.DateTime.Month, firstData.DateTime.Day, hour, 0, 0);
dateTime = dateTime.AddHours((int)CommonProperty.ExchangeTime.UpbitorBithumb);
return new CandleData()
{
DateTime = new DateTime(firstData.DateTime.Year, firstData.DateTime.Month, firstData.DateTime.Day, hour, 0, 0),
DateTime = dateTime,
HighValue = firstData.HighValue,
StartValue = firstData.StartValue,
LowValue = firstData.LowValue,
@@ -385,7 +391,10 @@ namespace Million.Manager
}
else if (timeFlag == "hour")
{
if (candleData.DateTime.Hour % timeFlagValue == 1)
var hour = candleData.DateTime.Hour;
if (hour == 0) hour += 24;
if ((hour - (int)CommonProperty.ExchangeTime.UpbitorBithumb) % timeFlagValue == 0)
{
if (recentlyData.DateTime.Hour != candleData.DateTime.Hour)
flag = true;