Update utils.py
Browse files
utils.py
CHANGED
@@ -57,7 +57,10 @@ def run_strategy(ticker_symbol, strategy, period, interval, kwargs):
|
|
57 |
raise Exception(f"{ticker_symbol} data fetch failed")
|
58 |
|
59 |
if len(data) == 0:
|
60 |
-
|
|
|
|
|
|
|
61 |
else:
|
62 |
break
|
63 |
|
|
|
57 |
raise Exception(f"{ticker_symbol} data fetch failed")
|
58 |
|
59 |
if len(data) == 0:
|
60 |
+
if i < retries - 1:
|
61 |
+
print(f"Attempt{i+1}: {ticker_symbol} ohlc is empty")
|
62 |
+
else:
|
63 |
+
raise Exception(f"{ticker_symbol} ohlc is empty")
|
64 |
else:
|
65 |
break
|
66 |
|