사놓고 꺼진거 데이터 처리 완료

This commit is contained in:
kyh
2022-11-21 15:24:36 +09:00
parent 227a9eb1ab
commit 9d1f208cfb
2 changed files with 61 additions and 10 deletions

View File

@@ -371,12 +371,50 @@ namespace Million_Buyer
CommonProperty.subIndicatorStateManagement[item.IndexString] = dic;
}
#region TODO 이미 구매되어 있는 종목에 대한 기본 데이터 Setting 필요
if (RealTimeMode)
if (!RealTimeMode)
{
foreach(var item in this.accounts)
{
if(item.Currency != "KRW")
{
var buyItem = new CandleDataList();
}
else
{
var temp = dataList[MCandleTimeType.M1].FirstOrDefault(t => t.ConGoodsData.CoinFullName == item.UnitCurrency + "-" + item.Currency);
if (temp == null) continue;
buyItem.ConGoodsData = temp.ConGoodsData;
var candle = new CandleData();
candle.BuyTime = new DateTime(2000, 1, 1);
candle.BuyValue = item.AvgBuyPrice;
candle.BuyCount = item.Balance;
buyItem.CandleDataLists_Im.Add(candle);
buyList.Add(buyItem);
}
}
this.BeginInvoke(new Action(delegate ()
{
try
{
foreach (var item in buyList)
{
var recentlyData = item.CandleDataLists_Im[0];
var time = recentlyData.BuyTime;
tl_BuyList.AppendNode(new object[]
{
item.ConGoodsData.CoinFullName, recentlyData.BuyValue, recentlyData.BuyCount, time.ToString("yyyy-MM-dd HH:mm:ss")
}, null);
}
lb_BuyMarketCount.Text = buyList.Count.ToString();
}
catch (Exception e)
{
InsertLog("이전에 사놓은 개수 입력 관련 에러" + e.Message);
}
}));
}
#endregion