수정 올림

This commit is contained in:
kyh
2024-12-13 15:46:18 +09:00
parent 727c6fdc0a
commit 1f80bdc718

View File

@@ -240,6 +240,8 @@ namespace BitgetAPI.IndicatorConditionSetup
dic.Add("beforeLowVal", 0);
dic.Add("twoBeforeHighVal", 0);
dic.Add("twoBeforeLowVal", 0);
dic.Add("tempBeforeLowVal", 0);
dic.Add("tempBeforeHighVal", 0);
전저고점.Add(market + strInterval, dic);
}
@@ -457,17 +459,31 @@ namespace BitgetAPI.IndicatorConditionSetup
var 저고점 = 전저고점[market + strInterval];
if (전봉4 > (전전봉4 * 1.0001) && 전전봉4 < 전전전봉4)
if (현재봉4 > (전봉4 * 1.0001) && 전봉4 < 전전봉4)
{
저고점["tempBeforeLowVal"] = 저고점["twoBeforeLowVal"];
저고점["twoBeforeLowVal"] = 저고점["beforeLowVal"];
저고점["beforeLowVal"] = 전봉4;
}
if (전봉4 < (전전봉4 * 1.0001) && 전전봉4 > 전전전봉4)
else if(현재봉4 < (전봉4 * 1.0001) && 저고점["tempBeforeLowVal"] == 저고점["twoBeforeLowVal"])
{
저고점["beforeLowVal"] = 저고점["twoBeforeLowVal"];
저고점["twoBeforeLowVal"] = 저고점["tempBeforeLowVal"];
저고점["tempBeforeLowVal"] = 0;
}
if (현재봉4 < (전봉4 * 1.0001) && 전봉4 > 전전봉4)
{
저고점["tempBeforeHighVal"] = 저고점["twoBeforeHighVal"];
저고점["twoBeforeHighVal"] = 저고점["beforeHighVal"];
저고점["beforeHighVal"] = 전봉4;
}
else if(현재봉4 > (전봉4 * 1.0001))
{
저고점["beforeHighVal"] = 저고점["tempBeforeHighVal"];
저고점["twoBeforeHighVal"] = 저고점["tempBeforeHighVal"];
저고점["tempBeforeHighVal"] = 0;
}
if (저고점["twoBeforeLowVal"] == 0 || 저고점["twoBeforeHighVal"] == 0)
continue;
@@ -487,15 +503,13 @@ namespace BitgetAPI.IndicatorConditionSetup
try
{
//사는 시점
if (!UpBuyList.ContainsKey(market + interval))
{
var buyFlag = false;
if ((전봉12 > 전전봉12 || 전봉24 > 전전봉24) &&
현재봉4 > 저고점["beforeHighVal"] && 전봉24 < 전봉4 &&
candleData.Close > 저고점["beforeHighVal"] && 전봉24 < 전봉4 &&
저고점["twoBeforeLowVal"] < 저고점["beforeLowVal"] &&
저고점["twoBeforeHighVal"] < 저고점["beforeHighVal"])
{
@@ -685,7 +699,7 @@ namespace BitgetAPI.IndicatorConditionSetup
{
var buyFlag = false;
if ((전봉12 < 전전봉12 || 전봉24 < 전전봉24) &&
현재봉4 < 저고점["beforeLowVal"] && 전봉24 > 전봉4 &&
candleData.Close < 저고점["beforeLowVal"] && 전봉24 > 전봉4 &&
저고점["twoBeforeHighVal"] > 저고점["beforeHighVal"] &&
저고점["twoBeforeLowVal"] > 저고점["beforeLowVal"])
{