From 1a71674bda386db1bc6043f51f268320b49599fc Mon Sep 17 00:00:00 2001 From: kyh <1329522@naver.com> Date: Mon, 26 Aug 2024 12:57:15 +0900 Subject: [PATCH] =?UTF-8?q?Up,=20Down=20=EB=91=90=EA=B0=9C=20=EB=82=98?= =?UTF-8?q?=EB=88=94=20(Buy,=20Result)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IndicatorProcess.cs | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/BitgetApi/IndicatorConditionSetup/IndicatorProcess.cs b/BitgetApi/IndicatorConditionSetup/IndicatorProcess.cs index b158796..edb4b29 100644 --- a/BitgetApi/IndicatorConditionSetup/IndicatorProcess.cs +++ b/BitgetApi/IndicatorConditionSetup/IndicatorProcess.cs @@ -43,9 +43,15 @@ namespace BitgetAPI.IndicatorConditionSetup public bool 영호조건식_하향돌파 = false; //구매 리스트 - public Dictionary> BuyList = new Dictionary>(); + public Dictionary> UpBuyList = new Dictionary>(); //결과 리스트 - public List> ResultList = new List>(); + public List> UpResultList = new List>(); + + //구매 리스트 + public Dictionary> DownBuyList = new Dictionary>(); + //결과 리스트 + public List> DownResultList = new List>(); + public Dictionary 판매조건Flag = new Dictionary(); public Dictionary 최초조건Flag = new Dictionary(); // 전봉이 구름떼 돌파후 시가가 구름떼 위에서 시작하는 것 @@ -424,7 +430,7 @@ namespace BitgetAPI.IndicatorConditionSetup } //사는 시점 - if (!BuyList.ContainsKey(market + interval)) + if (!UpBuyList.ContainsKey(market + interval)) { if ( ( @@ -466,7 +472,7 @@ namespace BitgetAPI.IndicatorConditionSetup { "Candle", candleData } }; - BuyList.Add(market + interval, buyDic); + UpBuyList.Add(market + interval, buyDic); 최초조건Flag[market + interval] = false; if (현재봉4 > 현재봉12) { @@ -491,7 +497,7 @@ namespace BitgetAPI.IndicatorConditionSetup //파는 시점 else { - var buyItem = BuyList[market + interval]; + var buyItem = UpBuyList[market + interval]; if (interval < MCandleTimeType.H1) { if (nowTime < ((DateTime)buyItem["BuyDate"]).AddMinutes((int)interval)) @@ -537,8 +543,8 @@ namespace BitgetAPI.IndicatorConditionSetup { "Rate", resultRate } }; - ResultList.Add(result); - BuyList.Remove(market + interval); + UpResultList.Add(result); + UpBuyList.Remove(market + interval); } } @@ -683,7 +689,7 @@ namespace BitgetAPI.IndicatorConditionSetup } //사는 시점 - if (!BuyList.ContainsKey(market + interval)) + if (!DownBuyList.ContainsKey(market + interval)) { if ( ( @@ -736,7 +742,7 @@ namespace BitgetAPI.IndicatorConditionSetup { "Candle", candleData } }; - BuyList.Add(market + interval, buyDic); + DownBuyList.Add(market + interval, buyDic); 최초조건Flag[market + interval] = false; if (현재봉4 > 현재봉12) { @@ -761,7 +767,7 @@ namespace BitgetAPI.IndicatorConditionSetup //파는 시점 else { - var buyItem = BuyList[market + interval]; + var buyItem = DownBuyList[market + interval]; if (interval < MCandleTimeType.H1) { if (nowTime < ((DateTime)buyItem["BuyDate"]).AddMinutes((int)interval)) @@ -807,8 +813,8 @@ namespace BitgetAPI.IndicatorConditionSetup { "Rate", resultRate } }; - ResultList.Add(result); - BuyList.Remove(market + interval); + DownResultList.Add(result); + DownBuyList.Remove(market + interval); } } }