fix: Add signal_date definition from DataFrame in t_sunnyband.py
This commit is contained in:
parent
8c1b98860f
commit
b64e3b5a27
@ -250,6 +250,8 @@ def run_sunny_scanner(min_price: float, max_price: float, min_volume: int, portf
|
|||||||
)
|
)
|
||||||
if position['shares'] > 0:
|
if position['shares'] > 0:
|
||||||
# Update signal data with proper stop loss calculation
|
# Update signal data with proper stop loss calculation
|
||||||
|
# Get signal date from latest data point
|
||||||
|
signal_date = df.iloc[-1]['date']
|
||||||
signal_data = {
|
signal_data = {
|
||||||
'ticker': ticker,
|
'ticker': ticker,
|
||||||
'entry_price': current_price,
|
'entry_price': current_price,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user