Skip to content

Commit

Permalink
return None when next bar is not available
Browse files Browse the repository at this point in the history
_load method of the feed should returned False when price
data is not yet available. This caused cerebro to stop.
It should return None in this case to indicate timeout
getting the data.

Signed-off-by: Ed Bartosh <bartosh@gmail.com>
  • Loading branch information
bartosh committed Jan 7, 2018
1 parent 30516b8 commit d6a82e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backtrader/feeds/ccxt.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def _load_ticks(self):
try:
trade = self._data.popleft()
except IndexError:
return False # no data in the queue
return None # no data in the queue

trade_time, price, size = trade

Expand Down

0 comments on commit d6a82e3

Please sign in to comment.