From 639db8ada5b1c5b21b10c837888952ab42512c31 Mon Sep 17 00:00:00 2001 From: tae2564 Date: Mon, 22 Dec 2025 22:13:03 +0900 Subject: [PATCH] =?UTF-8?q?candle=5Fcount=20=EA=B0=92=EC=9D=84=20202?= =?UTF-8?q?=EB=A1=9C=20=EC=88=98=EC=A0=95=ED=95=98=EA=B3=A0,=20SMA=20?= =?UTF-8?q?=EA=B4=80=EB=A0=A8=20=EC=A1=B0=EA=B1=B4=20=EB=A9=94=EC=8B=9C?= =?UTF-8?q?=EC=A7=80=20=ED=8F=AC=EB=A7=B7=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/config.json | 2 +- src/signals.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/config.json b/config/config.json index 06fca2a..7a79e00 100644 --- a/config/config.json +++ b/config/config.json @@ -1,7 +1,7 @@ { "symbols_file": "config/symbols.txt", "symbol_delay": 1.0, - "candle_count": 201, + "candle_count": 202, "buy_check_interval_minutes": 240, "stop_loss_check_interval_minutes": 60, "profit_taking_check_interval_minutes": 240, diff --git a/src/signals.py b/src/signals.py index 4ec9e0d..f0d93ba 100644 --- a/src/signals.py +++ b/src/signals.py @@ -629,7 +629,7 @@ def _process_symbol_core(symbol: str, cfg: "RuntimeConfig", indicators: dict = N # 조건1: MACD 상향 + SMA + ADX (None-safe) cond1_macd = f"MACD: {_safe_format(dp.get('prev_macd'), 6)}->{_safe_format(dp.get('curr_macd'), 6)}, Sig: {_safe_format(dp.get('prev_signal'), 6)}->{_safe_format(dp.get('curr_signal'), 6)}" - cond1_sma = f"SMA: {_safe_format(dp.get('curr_sma_short'), 2)} > {_safe_format(dp.get('curr_sma_long'), 2)}" + cond1_sma = f"SMA5: {_safe_format(dp.get('curr_sma_short'), 2)} > SMA200: {_safe_format(dp.get('curr_sma_long'), 2)}" cond1_adx = f"ADX: {_safe_format(dp.get('curr_adx'), 2)} > {adx_threshold}" result["summary"].append( f"[조건1 {'충족' if c['macd_cross_ok'] and c['sma_condition'] and c['adx_ok'] else '미충족'}] " @@ -637,7 +637,7 @@ def _process_symbol_core(symbol: str, cfg: "RuntimeConfig", indicators: dict = N ) # 조건2: SMA 골든크로스 + MACD + ADX (None-safe) - cond2_sma = f"SMA: {_safe_format(dp.get('prev_sma_short'), 2)}->{_safe_format(dp.get('curr_sma_short'), 2)} cross {_safe_format(dp.get('prev_sma_long'), 2)}->{_safe_format(dp.get('curr_sma_long'), 2)}" + cond2_sma = f"SMA5: {_safe_format(dp.get('prev_sma_short'), 2)}->{_safe_format(dp.get('curr_sma_short'), 2)} cross SMA200: {_safe_format(dp.get('prev_sma_long'), 2)}->{_safe_format(dp.get('curr_sma_long'), 2)}" cond2_macd = f"MACD: {_safe_format(dp.get('curr_macd'), 6)} > Sig: {_safe_format(dp.get('curr_signal'), 6)}" cond2_adx = f"ADX: {_safe_format(dp.get('curr_adx'), 2)} > {adx_threshold}" result["summary"].append( @@ -647,7 +647,7 @@ def _process_symbol_core(symbol: str, cfg: "RuntimeConfig", indicators: dict = N # 조건3: ADX 상향 + SMA + MACD (None-safe) cond3_adx = f"ADX: {_safe_format(dp.get('prev_adx'), 2)}->{_safe_format(dp.get('curr_adx'), 2)} cross {adx_threshold}" - cond3_sma = f"SMA: {_safe_format(dp.get('curr_sma_short'), 2)} > {_safe_format(dp.get('curr_sma_long'), 2)}" + cond3_sma = f"SMA5: {_safe_format(dp.get('curr_sma_short'), 2)} > SMA200: {_safe_format(dp.get('curr_sma_long'), 2)}" cond3_macd = f"MACD: {_safe_format(dp.get('curr_macd'), 6)} > Sig: {_safe_format(dp.get('curr_signal'), 6)}" result["summary"].append( f"[조건3 {'충족' if c['cross_adx'] and c['sma_condition'] and c['macd_above_signal'] else '미충족'}] "