diff --git a/Million Hunter/HunterMainForm.cs b/Million Hunter/HunterMainForm.cs index 14bfd24..0030a3d 100644 --- a/Million Hunter/HunterMainForm.cs +++ b/Million Hunter/HunterMainForm.cs @@ -352,8 +352,8 @@ namespace Million var dic = new Dictionary>(); 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) diff --git a/Million/CommonProperty.cs b/Million/CommonProperty.cs index 233b059..e4ad14d 100644 --- a/Million/CommonProperty.cs +++ b/Million/CommonProperty.cs @@ -68,7 +68,12 @@ namespace Million POST = 0, GET = 1 } - + + public enum ExchangeTime + { + UpbitorBithumb = 9 + } + // 거래소 타입 public enum ExchangePlace { diff --git a/Million/Manager/DataManager.cs b/Million/Manager/DataManager.cs index 00b73c6..fec6cf0 100644 --- a/Million/Manager/DataManager.cs +++ b/Million/Manager/DataManager.cs @@ -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;