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/

    TA-Lib pattern recognition

    Indicators/Strategies/Analyzers
    1
    1
    324
    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.
    • Steven Veenma
      Steven Veenma last edited by

      This is my first post on this forum. Let me first say that I like Backtrader very much. I've already tested different strategies and built my own indicators. So please keep up the good work!

      I want to test pattern recognition and so I read the documents on the TA-Lib integration. First I tested some other TA-Lib indicators like

      self.pattern = bt.indicators.TRIX(self.datas[0])
      

      that worked well. But I can't get the pattern recognition to work. The examples shows:

      bt.talib.CDLDOJI(self.data.open, self.data.high,
                                   self.data.low, self.data.close)
      

      This returns an error: module 'backtrader.talib' has no attribute 'CDLDOJ.

      I tried other variants like

      bt.indicators.CDLDOJI(self.datas[0]
      

      but that doesn't work either.

      There is a remark on this type of indicators:

      Indicators which output a CANDLE (all those looking for a candlestick pattern) deliver a binary output: either 0 or 100. In order to avoid adding a subplot to the chart, there is an automated plotting translation to plot them over the data at the point in time in which the pattern was recognized.

      I have used boolean like indicators before so this should not be a problem.

      How to get these pattern recognition to work.?

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