refactor: Add debug output for entry price and upper band in sunny scanner
This commit is contained in:
parent
4a3464b2d9
commit
53ebc1767c
@ -353,9 +353,12 @@ def run_sunny_scanner(min_price: float, max_price: float, min_volume: int, portf
|
||||
if calculator:
|
||||
print(f"Debug: Calculator exists, calculating position for price: ${last_day['close']:.2f}") # Debug line
|
||||
try:
|
||||
entry_price = last_day['close']
|
||||
upper_band = results['upper_band'].iloc[-1]
|
||||
print(f"Debug: Entry: ${entry_price:.2f}, Upper Band: ${upper_band:.2f}") # Debug line
|
||||
position = calculator.calculate_position_size(
|
||||
entry_price=last_day['close'],
|
||||
target_price=results['upper_band'].iloc[-1]
|
||||
entry_price=entry_price,
|
||||
target_price=upper_band
|
||||
)
|
||||
# Format debug position output with rounded values
|
||||
debug_position = {k: round(float(v), 2) if isinstance(v, (float, np.float64)) else v
|
||||
|
||||
Loading…
Reference in New Issue
Block a user