Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    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

    bta-lib
    4
    5
    664
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • SPECULARI FUND
      SPECULARI FUND last edited by SPECULARI FUND

      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?

      Xavier Escudero 1 Reply Last reply Reply Quote 0
      • Xavier Escudero
        Xavier Escudero @SPECULARI FUND last edited by

        @SPECULARI-FUND I've the same problem. Have you any solution?

        run-out SPECULARI FUND 2 Replies Last reply Reply Quote 0
        • run-out
          run-out @Xavier Escudero last edited by

          @Xavier-Escudero Could you open a seperate question with your code and error message and we can help you?

          RunBacktest.com

          1 Reply Last reply Reply Quote 0
          • SPECULARI FUND
            SPECULARI FUND @Xavier Escudero last edited by

            @Xavier-Escudero said in Crossover + MACD error:

            @SPECULARI-FUND I've the same problem. Have you any solution?

            I used raw data from the API to this library.

            1 Reply Last reply Reply Quote 0
            • Elis Moer
              Elis Moer last edited by

              The major causes of streaks and disturbances within the spray pattern whilst the use of Airless devices are: Pressure set too low. Nozzle worn. Material spray paint deliver disrupted (eg clogged filters)

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors