feat: Add stock_type to signal data in t_sunnyband.py
This commit is contained in:
parent
a80a4b12e5
commit
1cc04b500a
@ -235,7 +235,7 @@ def run_sunny_scanner(min_price: float, max_price: float, min_volume: int, portf
|
|||||||
bearish_signals = []
|
bearish_signals = []
|
||||||
|
|
||||||
# Process each qualified stock
|
# Process each qualified stock
|
||||||
for ticker, current_price, current_volume, last_update in qualified_stocks:
|
for ticker, current_price, current_volume, last_update, stock_type in qualified_stocks:
|
||||||
try:
|
try:
|
||||||
# Get historical data based on interval
|
# Get historical data based on interval
|
||||||
df = get_stock_data(ticker, start_date, end_date, interval)
|
df = get_stock_data(ticker, start_date, end_date, interval)
|
||||||
@ -259,6 +259,7 @@ def run_sunny_scanner(min_price: float, max_price: float, min_volume: int, portf
|
|||||||
'target_price': signal_data['upper_band'],
|
'target_price': signal_data['upper_band'],
|
||||||
'signal_date': signal_date,
|
'signal_date': signal_date,
|
||||||
'volume': current_volume,
|
'volume': current_volume,
|
||||||
|
'stock_type': stock_type,
|
||||||
'last_update': datetime.fromtimestamp(last_update/1000000000),
|
'last_update': datetime.fromtimestamp(last_update/1000000000),
|
||||||
'shares': position['shares'],
|
'shares': position['shares'],
|
||||||
'position_size': position['position_value'],
|
'position_size': position['position_value'],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user