From a300d6e79426dcb1cbb004938497add98dcfc31b Mon Sep 17 00:00:00 2001 From: kyh <1329522@naver.com> Date: Mon, 2 Dec 2024 12:09:03 +0900 Subject: [PATCH] =?UTF-8?q?=20=EC=88=98=EC=A0=95t?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IndicatorProcess.cs | 2 +- .../MovingAverageConditionSetup.cs | 20 +++---------------- BitgetApi/IndicatorData/MovingAverageData.cs | 4 ++-- 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/BitgetApi/IndicatorConditionSetup/IndicatorProcess.cs b/BitgetApi/IndicatorConditionSetup/IndicatorProcess.cs index bc425ae..e34559c 100644 --- a/BitgetApi/IndicatorConditionSetup/IndicatorProcess.cs +++ b/BitgetApi/IndicatorConditionSetup/IndicatorProcess.cs @@ -478,7 +478,7 @@ namespace BitgetAPI.IndicatorConditionSetup 전봉72 < 전봉2 && 전전봉72 < 전전봉2 && 전전봉12 > 전전봉2 && 전봉12 < 전봉2 ) { - BuyShortStep[market + interval] = true; + BuyLongStep[market + interval] = true; continue; } } diff --git a/BitgetApi/IndicatorConditionSetup/MovingAverageConditionSetup.cs b/BitgetApi/IndicatorConditionSetup/MovingAverageConditionSetup.cs index 2095760..1b05ff3 100644 --- a/BitgetApi/IndicatorConditionSetup/MovingAverageConditionSetup.cs +++ b/BitgetApi/IndicatorConditionSetup/MovingAverageConditionSetup.cs @@ -102,23 +102,9 @@ namespace BitgetAPI.IndicatorConditionSetup t_Close += Math.Pow(data[j].Close - average, 2); - //하향선 - if (mvData.BolangerType == 0) - { - mvData.BolangerValue_Down = average - mvData.BolangerSquared * Math.Sqrt(t_Close / period); - } - //상향선 - else if (mvData.BolangerType == 1) - { - - mvData.BolangerValue_Up = average + mvData.BolangerSquared * Math.Sqrt(t_Close / period); - } - //기준선 - else if (mvData.BolangerType == 2) - { - - mvData.BolangerValue = average; - } + mvData.BolangerValue_Down = average - mvData.BolangerSquared * Math.Sqrt(t_Close / period); + mvData.BolangerValue_Up = average + mvData.BolangerSquared * Math.Sqrt(t_Close / period); + mvData.Average = average; } } } diff --git a/BitgetApi/IndicatorData/MovingAverageData.cs b/BitgetApi/IndicatorData/MovingAverageData.cs index 7685863..7fa5936 100644 --- a/BitgetApi/IndicatorData/MovingAverageData.cs +++ b/BitgetApi/IndicatorData/MovingAverageData.cs @@ -13,10 +13,10 @@ namespace BitgetAPI.Data.IndicatorData public double Value { get; set; } // Bol Value public double BolangerValue_Down { get; set; } - public double BolangerValue { get; set; } + public double Average { get; set; } public double BolangerValue_Up { get; set; } // Bol Type 0 하향 1 상향 2기준 - public int BolangerType { get; set; } = 0; + // Bol 편차 public int BolangerSquared { get; set; } = 20; }