Invicto69 commited on
Commit
922de0b
·
verified ·
1 Parent(s): 349a356

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +4 -1
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
- raise Exception(f"{ticker_symbol} ohlc is empty")
 
 
 
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