Handle "no data" case in ranger calcs and avoid crashes
parent
3e7d4f8717
commit
6f3d78b729
|
@ -93,6 +93,7 @@ def chart_maxmin(
|
||||||
if not in_view.size:
|
if not in_view.size:
|
||||||
log.warning('Resetting chart to data')
|
log.warning('Resetting chart to data')
|
||||||
chart.default_view()
|
chart.default_view()
|
||||||
|
return (last_bars_range, 0, 0, 0)
|
||||||
|
|
||||||
mx, mn = np.nanmax(in_view['high']), np.nanmin(in_view['low'])
|
mx, mn = np.nanmax(in_view['high']), np.nanmin(in_view['low'])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue