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/

    Is it possible to do nested talib indicators?

    Indicators/Strategies/Analyzers
    2
    2
    719
    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.
    • C
      CptanPanic last edited by

      I would like to do something like the the LINEARREG of the output of another talib indicator. Is this possible directly, or do I need to just make my own indicator that combines them?

      Thanks.

      1 Reply Last reply Reply Quote 0
      • P
        Paska Houso last edited by

        Have you tried? It seems the TA-Lib indicators you see are automatically generated wrappers around TA-Lib. As such the behavior should be the same as seen in the docs and example.

        sma = bt.ind.SMA(self.data, period=10)
        sma_on_sma = bt.ind.SMA(period=5)
        

        and

        ta_sma = bt.talib.SMA(self.data, timeperiod=self.p.period)
        ta_sma_on_ta_sma = bt.talib.SMA(ta_sma_on_ta_sma, timeperiod=self.p.period)
        #or 
        sma_on_ta_sma = bt.SMA(ta_sma_on_ta_sma, timeperiod=self.p.period)
        
        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors