From 122a283cd55b4c6e4d5f9cb735d2d2599bcba923 Mon Sep 17 00:00:00 2001 From: kyh <1329522@naver.com> Date: Tue, 17 Jun 2025 11:41:09 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B4=88=EA=B8=B0=ED=99=94=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IndicatorProcess.cs | 33 +++++++++++++++---- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/BitgetApi/IndicatorConditionSetup/IndicatorProcess.cs b/BitgetApi/IndicatorConditionSetup/IndicatorProcess.cs index 5c253b0..71c546d 100644 --- a/BitgetApi/IndicatorConditionSetup/IndicatorProcess.cs +++ b/BitgetApi/IndicatorConditionSetup/IndicatorProcess.cs @@ -121,8 +121,8 @@ namespace BitgetAPI.IndicatorConditionSetup public Dictionary BuyShortStepStampData = new Dictionary(); public Dictionary BuyLongStepStampData = new Dictionary(); - - public int 전가Flag = 1; + public Dictionary FirstFlag = new Dictionary(); + // 전봉이 구름떼 돌파후 시가가 구름떼 위에서 시작하는 것 @@ -239,6 +239,8 @@ namespace BitgetAPI.IndicatorConditionSetup if (!전저고점.ContainsKey(market + strInterval)) { + FirstFlag.Add(market + strInterval + "Long", false); + FirstFlag.Add(market + strInterval + "Short", false); var dic = new Dictionary { { "전고가", 0 }, @@ -371,8 +373,17 @@ namespace BitgetAPI.IndicatorConditionSetup //사는 시점 if (!UpBuyList.ContainsKey(market)) { - if (sMABandConditionSetup.Calculate(candleDatas_5_TempList, SMABandType.LongBuy) && - !sMABandConditionSetup.Calculate(candleDatas_5_TempList, SMABandType.LongSell)) + if(!FirstFlag[market + strInterval + "Long"]) + { + if(sMABandConditionSetup.Calculate(candleDatas_5_TempList, SMABandType.LongSell, true)) + { + FirstFlag[market + strInterval + "Long"] = true; + } + } + + if (sMABandConditionSetup.Calculate(candleDatas_5_TempList, SMABandType.LongBuy, true) && + !sMABandConditionSetup.Calculate(candleDatas_5_TempList, SMABandType.LongSell, true) && + FirstFlag[market + strInterval + "Long"]) { BuyLongStep[market] = 0; // 없으면 생성 @@ -565,8 +576,18 @@ namespace BitgetAPI.IndicatorConditionSetup //사는 시점 if (!DownBuyList.ContainsKey(market)) { - if (sMABandConditionSetup.Calculate(candleDatas_5_TempList, SMABandType.ShortBuy) && - !sMABandConditionSetup.Calculate(candleDatas_5_TempList, SMABandType.ShortSell)) + if (!FirstFlag[market + strInterval + "Short"]) + { + if (sMABandConditionSetup.Calculate(candleDatas_5_TempList, SMABandType.ShortSell, true)) + { + FirstFlag[market + strInterval + "Short"] = true; + } + } + + + if (sMABandConditionSetup.Calculate(candleDatas_5_TempList, SMABandType.ShortBuy, true) && + !sMABandConditionSetup.Calculate(candleDatas_5_TempList, SMABandType.ShortSell, true) && + FirstFlag[market + strInterval + "Short"]) { BuyShortStep[market] = 0; // 없으면 생성