code-review-fix task 15.4: add missing fallback return for volume indicators in talib_features.py
This commit is contained in:
parent
09a361ca54
commit
49daaae36a
1 changed files with 2 additions and 0 deletions
|
|
@ -187,6 +187,8 @@ def _call_talib_function(
|
||||||
return func(high_prices, low_prices, close_prices, volume, **params)
|
return func(high_prices, low_prices, close_prices, volume, **params)
|
||||||
elif name == 'MFI':
|
elif name == 'MFI':
|
||||||
return func(high_prices, low_prices, close_prices, volume, **params)
|
return func(high_prices, low_prices, close_prices, volume, **params)
|
||||||
|
# Fallback return for volume indicators if no matching case
|
||||||
|
return np.array([])
|
||||||
elif name in hl_indicators:
|
elif name in hl_indicators:
|
||||||
return func(high_prices, low_prices, **params)
|
return func(high_prices, low_prices, **params)
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue