For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

Crossover + MACD error



  • self.macd = btalib.macd(self.get_data_bars(self.symbol, '1Min')[self.symbol], pfast=self.params.macdfast, pslow=self.params.macdslow, psignal=self.params.macdsignal)
    
    self.macdX = btalib.crossover(self.macd.macd, self.macd.signal)
    print(self.macd.df)
    
                         
    time      macd    signal  histogram
    
    
    2020-10-19 11:37:00-04:00       NaN       NaN        NaN
    2020-10-19 11:38:00-04:00       NaN       NaN        NaN
    2020-10-19 11:39:00-04:00       NaN       NaN        NaN
    2020-10-19 11:40:00-04:00       NaN       NaN        NaN
    2020-10-19 11:41:00-04:00       NaN       NaN        NaN
    ...                             ...       ...        ...
    2020-10-19 14:52:00-04:00 -0.248898 -0.304889   0.055992
    2020-10-19 14:53:00-04:00 -0.252423 -0.298331   0.045908
    2020-10-19 14:54:00-04:00 -0.225212 -0.289191   0.063979
    2020-10-19 14:55:00-04:00 -0.164539 -0.273610   0.109071
    2020-10-19 14:56:00-04:00 -0.086874 -0.250268   0.163394
    
    

    Error:

    UserWarning: evaluating in Python space because the '-' operator is not supported by numexpr for the bool dtype, use '^' instead
      f"evaluating in Python space because the {repr(op_str)} "
    

    What I am doing wrong?


Log in to reply
 

});