MontrealTradingGroup / freqtrade

Simple High Frequency Trading Bot for crypto currencies
GNU General Public License v3.0
70 stars 61 forks source link

TypeError: reduce() of empty sequence with no initial value #7

Closed OtenMoten closed 4 years ago

OtenMoten commented 4 years ago

Hello community,

if you got this error TypeError: reduce() of empty sequence with no initial value

Here is the workaround:

  1. Go to your custom hyperopt file, in this case BBRSIOPT.py

  2. Change

    dataframe.loc[
    reduce(lambda x, y: x & y, conditions),
    'buy'] = 1

    in

    if conditions:
    dataframe.loc[
        reduce(lambda x, y: x & y, conditions),
        'buy'] = 1

It should work now.

Found here, and here, and also here