diff --git a/BitgetApi/IndicatorConditionSetup/SMABandConditionSetup.cs b/BitgetApi/IndicatorConditionSetup/SMABandConditionSetup.cs index e5cf3ca..d80bf5a 100644 --- a/BitgetApi/IndicatorConditionSetup/SMABandConditionSetup.cs +++ b/BitgetApi/IndicatorConditionSetup/SMABandConditionSetup.cs @@ -51,7 +51,7 @@ namespace BitgetApi.IndicatorConditionSetup double sma4 = Sma4(close, i); double prevSma4 = Sma4(close, i - 1); double prev2Sma4 = Sma4(close, i - 2); - double prev3Sma4 = Sma4(close, i - 2); + double prev3Sma4 = Sma4(close, i - 3); // 밴드 계산 double sma4High = Highest(close, i, 12); @@ -88,7 +88,7 @@ namespace BitgetApi.IndicatorConditionSetup } else { - if (cloudBottomNow < sma4) + if (!isSma4BelowCloud) firstCloudFlag = false; } @@ -117,13 +117,13 @@ namespace BitgetApi.IndicatorConditionSetup } else if (type == SMABandType.LongSell) - { - if (rawLongSell) - firstCloudFlag = true; + { return rawLongSell; } else if (type == SMABandType.ShortSell) { + if (rawLongSell) + firstCloudFlag = true; return rawShortSell; }