fix: Correct f-string format specifier in enhanced position monitor
Fixed invalid format specifier error:
- Cannot use conditional expression inside f-string format specifier
- Changed from: {atr_value:.5f if atr_value else 'N/A'}
- Changed to: separate variable with conditional, then format
This fixes the recurring ERROR in position monitor logs.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -413,7 +413,8 @@ def create_enhanced_position_monitor(
|
||||
logger.debug(f"Could not calculate ATR: {e}")
|
||||
|
||||
logger.info(f"\n🔍 Enhanced Position Monitor - {len(positions)} position(s)")
|
||||
logger.info(f" Session: {session.upper()} | ATR: {atr_value:.5f if atr_value else 'N/A'}")
|
||||
atr_display = f"{atr_value:.5f}" if atr_value else "N/A"
|
||||
logger.info(f" Session: {session.upper()} | ATR: {atr_display}")
|
||||
|
||||
for position in positions:
|
||||
should_update, new_sl, reason = trailing_manager.should_update_trailing_stop(
|
||||
|
||||
Reference in New Issue
Block a user