From c0dbc046b66b604640a39461c4fca1ede716b444 Mon Sep 17 00:00:00 2001 From: ILSEON-RYU Date: Fri, 1 May 2026 10:32:41 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A7=84=EC=9E=85=EA=B0=80=EB=A5=BC=20close=20?= =?UTF-8?q?=EA=B0=80=EA=B2=A9=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD=20(?= =?UTF-8?q?=ED=8A=B8=EB=A0=88=EC=9D=B4=EB=8D=94=20=ED=91=9C=EC=A4=80=20?= =?UTF-8?q?=EC=BB=A8=EB=B2=A4=EC=85=98)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 이전: 롱 = low * 0.9998, 숏 = high * 1.0002 (차트 마커 시각 보정값) 이후: 롱/숏 모두 신호 캔들의 close 지표(MA, RSI, MACD, BB)가 close 기준으로 계산되고 백테스팅 / TradingView 디폴트도 close 기준이라, 진입가 표기를 close 로 통일해 트레이더가 보는 관행과 일치시킴. 손절가 비율은 STOP_LOSS_PCT 그대로 ±10%. Co-Authored-By: Claude Opus 4.7 (1M context) --- app_streamlit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app_streamlit.py b/app_streamlit.py index 88b1480..800ecd0 100644 --- a/app_streamlit.py +++ b/app_streamlit.py @@ -96,12 +96,12 @@ def check_and_alert(df, symbol, interval): continue if sig in LONG_SIGNALS: - entry_price = float(triggered.iloc[-1]["low"]) * 0.9998 + entry_price = float(triggered.iloc[-1]["close"]) stop_price = entry_price * (1 - STOP_LOSS_PCT) msg = f"{label}\n{symbol} {interval}\n진입가: {entry_price:.2f}\n손절가: {stop_price:.2f}" _long_entry = {"price": entry_price, "stop": stop_price, "open_time": candle_time} elif sig in SHORT_SIGNALS: - entry_price = float(triggered.iloc[-1]["high"]) * 1.0002 + entry_price = float(triggered.iloc[-1]["close"]) stop_price = entry_price * (1 + STOP_LOSS_PCT) msg = f"{label}\n{symbol} {interval}\n진입가: {entry_price:.2f}\n손절가: {stop_price:.2f}" _short_entry = {"price": entry_price, "stop": stop_price, "open_time": candle_time}