fix: convert entry_time datetime to timestamp in grace period calculation
TypeError: unsupported operand type(s) for -: 'float' and 'datetime.datetime' Line 1462: time.time() - guard.entry_time Fixed to: time.time() - guard.entry_time.timestamp() Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1459,7 +1459,7 @@ class SmartRiskManager:
|
||||
"normal": 90,
|
||||
}.get(regime, 90)
|
||||
|
||||
time_since_entry = time.time() - guard.entry_time
|
||||
time_since_entry = time.time() - guard.entry_time.timestamp()
|
||||
in_grace_period = time_since_entry < grace_period_sec
|
||||
|
||||
# Lower threshold for losses (75%)
|
||||
|
||||
Reference in New Issue
Block a user