feat: add Telegram notifications and configurable stop loss
- notify.py: buy/sell/error alerts via upbit_trading_jm_bot - STOP_LOSS_PCT: trailing stop configurable via .env (default -5%) - notify_buy/notify_sell called on every trade execution Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@ from . import trader
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
STOP_LOSS_PCT = 0.10 # 최고가 대비 -10% → 트레일링 스탑
|
||||
STOP_LOSS_PCT = float(os.getenv("STOP_LOSS_PCT", "5")) / 100 # 최고가 대비 -N% → 트레일링 스탑
|
||||
CHECK_INTERVAL = 10 # 10초마다 체크
|
||||
|
||||
# 타임 스탑: N시간 경과 후 수익률이 M% 미만이면 청산
|
||||
|
||||
Reference in New Issue
Block a user