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/

    Differing CCI Outputs bta-lib vs Backtrader.Indicators

    Indicators/Strategies/Analyzers
    1
    1
    183
    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.
    • J
      jonrogers6 last edited by

      Good Morning,

      I'm getting differing CCI values from bta-lib compared to backtrader.indicators CCI output values when I run them on the same data set. When comparing the values against TradingView (my source of truth in this excercise), the bta-lib CCI outputs are matching and are what I would like to utilize for my BackTrader strategy. Is there a known bta-lib integration into BackTrader so that I can call on bta-lib indicators? In looking at the indicator source code (links below) there are some variations, but I'm not able to adjust the backtrader.indicator CCI code to reflect the bta-lib CCI output. Any recommendations on how to implement the bta-lib CCI into BackTrader strategies?

      bta-lib CCI script that is what I'd like to replicate in my BackTrader Strategy:
      https://github.com/mementum/bta-lib/blob/master/btalib/indicators/cci.py

      BackTrader Indicator script that produces CCI outputs that don't match my TradingView 'source of truth':
      https://github.com/mementum/backtrader/blob/master/backtrader/indicators/cci.py

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