feat: Enhance signal output with detailed position sizing and profit metrics
This commit is contained in:
parent
c248fd05df
commit
48745fbd34
@ -414,6 +414,22 @@ def run_sunny_scanner(min_price: float, max_price: float, min_volume: int, portf
|
||||
print(f"Entry Price: ${signal['price']:.2f}")
|
||||
print(f"Volume: {signal['volume']:,}")
|
||||
print(f"Target (Upper Band): ${signal['upper_band']:.2f}")
|
||||
|
||||
if 'shares' in signal:
|
||||
print("\nPosition Details:")
|
||||
print(f"Shares: {signal['shares']}")
|
||||
print(f"Position Value: ${float(signal['position_value']):.2f}")
|
||||
print(f"Stop Loss: ${float(signal['stop_loss']):.2f}")
|
||||
print(f"Risk Amount: ${abs(float(signal['potential_loss'])):.2f}")
|
||||
|
||||
# Calculate percentages
|
||||
entry_value = signal['price'] * signal['shares']
|
||||
profit_potential = float(signal['potential_profit'])
|
||||
profit_percentage = (profit_potential / entry_value) * 100
|
||||
|
||||
print(f"Target Price: ${float(signal['target_price']):.2f}")
|
||||
print(f"Potential Profit: ${profit_potential:.2f} ({profit_percentage:.1f}%)")
|
||||
print(f"Risk/Reward Ratio: ${float(signal['risk_reward_ratio']):.2f}")
|
||||
|
||||
if 'shares' in signal:
|
||||
# Convert numpy float64 to regular float if needed
|
||||
|
||||
Loading…
Reference in New Issue
Block a user