MCP 차단관련 로직 추가
This commit is contained in:
@@ -494,9 +494,11 @@ def is_daily_loss_exceeded(
|
||||
total_assets: float,
|
||||
realized_pnl_today: float,
|
||||
) -> bool:
|
||||
"""일일 손실 한도 초과 여부 (전체 자본 -3%)"""
|
||||
if total_assets <= 0:
|
||||
return False
|
||||
# realized_pnl_today가 0이면 손실 없음 → 한도 미초과
|
||||
if realized_pnl_today >= 0:
|
||||
return False
|
||||
return (realized_pnl_today / total_assets) <= DAILY_LOSS_LIMIT
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user