fix: Define indicator and reorder start_date initialization in t_atr_ema.py
This commit is contained in:
parent
422e11e4bf
commit
8f34d143c8
@ -11,6 +11,7 @@ def check_atr_ema_bullish_signal(df: pd.DataFrame) -> bool:
|
||||
"""Check for bullish signal based on ATR EMA indicator"""
|
||||
# Get latest values from DataFrame
|
||||
last_price = df.iloc[-1]
|
||||
indicator = ThreeATREMAIndicator()
|
||||
results = indicator.calculate(df)
|
||||
last_bands = results.iloc[-1]
|
||||
|
||||
@ -42,9 +43,9 @@ def run_atr_ema_scanner(min_price: float, max_price: float, min_volume: int, por
|
||||
interval = get_interval_choice()
|
||||
|
||||
end_date = datetime.now()
|
||||
start_date = end_date - timedelta(days=1) # Get last trading day
|
||||
start_ts = int(start_date.timestamp() * 1000000000)
|
||||
end_ts = int(end_date.timestamp() * 1000000000)
|
||||
start_date = end_date - timedelta(days=1) # Get last trading day
|
||||
|
||||
client = create_client()
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user