fix: Correct Support/Resistance calculation in enhanced signal scoring

PROBLEM:
- "bad operand type for unary -: 'list'" error
- Line 265 tried to negate a list: support_levels = -support_levels
- _find_peaks() returns a list, not numpy array
- Caused S/R Score to default to 50/100

SOLUTION:
- Changed: support_levels = -support_levels
- To: support_levels = [-s for s in support_levels]
- Negates each element in the list individually

IMPACT:
- S/R Score now calculated correctly
- Enhanced Score will be more accurate
- Better trade filtering

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-22 14:04:27 +01:00
co-authored by Claude Opus 4.5
parent 38950e0254
commit 0098600963
+1 -1
View File
@@ -262,7 +262,7 @@ class EnhancedSignalScorer:
# Simple peak/trough detection
resistance_levels = self._find_peaks(highs, distance=10)
support_levels = self._find_peaks(-lows, distance=10) # Invert for troughs
support_levels = -support_levels
support_levels = [-s for s in support_levels] # Negate each element back
# Closest Support/Resistance
closest_support = max([s for s in support_levels if s < current_price], default=None)