진입가를 close 가격으로 변경 (트레이더 표준 컨벤션)
이전: 롱 = 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) <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user