diff --git a/BitgetApi/IndicatorConditionSetup/IndicatorProcess.cs b/BitgetApi/IndicatorConditionSetup/IndicatorProcess.cs index 970a0a3..3db78bc 100644 --- a/BitgetApi/IndicatorConditionSetup/IndicatorProcess.cs +++ b/BitgetApi/IndicatorConditionSetup/IndicatorProcess.cs @@ -126,7 +126,7 @@ namespace BitgetAPI.IndicatorConditionSetup public Dictionary BuyShortStep = new Dictionary(); public Dictionary BuyLongStep = new Dictionary(); - + public int 전가Flag = 1; @@ -679,17 +679,17 @@ namespace BitgetAPI.IndicatorConditionSetup && 저고점_30["tempLow2Val"] < 저고점_30["tempHigh2Val"] && 저고점_30["tempLow2Val"] > 저고점_30["tempHigh3Val"]); - var tempFlag2 = (저고점_30["Type"] == 1 + var tempFlag2 = (저고점_30["Type"] == 0 && 저고점_30["전저가"] < 저고점_30["전전저가"] - && 저고점_30["전전전고가"] > 저고점_30["전전고가"] + && 저고점_30["전전고가"] > 저고점_30["전고가"] && 저고점_30["tempHighVal"] > 저고점_30["tempLow2Val"] && 저고점_30["tempLowVal"] > 저고점_30["tempHighVal"] && 저고점_30["tempLow2Val"] > 저고점_30["tempHigh2Val"] && 저고점_30["tempHigh2Val"] > 저고점_30["tempLow3Val"]) || - (저고점_30["Type"] == 0 - && 저고점_30["전고가"] > 저고점_30["전전고가"] - && 저고점_30["전전전저가"] < 저고점_30["전전저가"] + (저고점_30["Type"] == 1 + && 저고점_30["전고가"] > 저고점_30["전전고가"] + && 저고점_30["전전저가"] < 저고점_30["전저가"] && 저고점_30["tempLowVal"] > 저고점_30["tempHigh2Val"] && 저고점_30["tempLowVal"] < 저고점_30["tempHighVal"] && 저고점_30["tempLow2Val"] < 저고점_30["tempHigh2Val"] @@ -697,6 +697,13 @@ namespace BitgetAPI.IndicatorConditionSetup if (영호조건식_상향돌파) { + if(!tempFlag && !tempFlag2 && !BuyLongStep[market + strInterval]) + { + BuyLongStep[market + strInterval] = true; + } + + if (!BuyLongStep[market + strInterval]) continue; + var price = candleData.Close; var rate = (candleData.Close / candleData.Open) * 100 - 100; var indicatorPrice = candleData.Open; @@ -752,7 +759,7 @@ namespace BitgetAPI.IndicatorConditionSetup var minSec = 0.0; if (tempFlag2) { - if (저고점_30["Type"] == 1) + if (저고점_30["Type"] == 0) { minSec = 저고점_30["tempLow2Val"]; } @@ -784,7 +791,7 @@ namespace BitgetAPI.IndicatorConditionSetup list.RemoveAt(list.Count - 1); var maxData =list.Max(t => t.High); - if(candleData.Close > maxData) + if(candleData.Open < maxData && candleData.Close > maxData && 현재봉5 > 전봉5) { buyFlag = true; } @@ -864,7 +871,7 @@ namespace BitgetAPI.IndicatorConditionSetup if (interval < MCandleTimeType.H1) { - var buyTime = ((DateTime)buyItem["CandleTime"]).AddMinutes(15); + var buyTime = ((DateTime)buyItem["CandleTime"]).AddMinutes(30); if (nowTime < buyTime) { @@ -1015,6 +1022,13 @@ namespace BitgetAPI.IndicatorConditionSetup var description = string.Format("{0} 72,24,4 하락", strInterval); var signalData = signals_SD.Find(i => i.MarketName.Equals(market) && i.Description.Equals(description)); + if (!tempFlag && !tempFlag2 && !BuyShortStep[market + strInterval]) + { + BuyShortStep[market + strInterval] = true; + } + + if (!BuyShortStep[market + strInterval]) continue; + try { //사는 시점 @@ -1088,9 +1102,9 @@ namespace BitgetAPI.IndicatorConditionSetup var list = candleDataList.Where(t => t.Argument > minDate).ToList(); list.RemoveAt(list.Count - 1); - var minData = list.Min(t => t.High); + var minData = list.Min(t => t.Low); - if (candleData.Close < minData) + if (candleData.Open > minData && candleData.Close < minData && 현재봉5 < 전봉5) { buyFlag = true; } @@ -1170,7 +1184,7 @@ namespace BitgetAPI.IndicatorConditionSetup var flag = (bool)buyItem["Flag"]; if (interval < MCandleTimeType.H1) { - var buyTime = ((DateTime)buyItem["CandleTime"]).AddMinutes(15); + var buyTime = ((DateTime)buyItem["CandleTime"]).AddMinutes(30); if (nowTime < buyTime) {