Backtrader Community

    • 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/

    receive ValueError from bta.smma()

    bta-lib
    2
    2
    4268
    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.
    • 1
      1one last edited by

      I always run into this ValueError no matter what I tried. So I think I'm missing something easy, but important.
      I'm happy for any help. Thanks!

      That's a code example:

      sma1 = bta.smma(df['C'], period=5)
      

      And that's the Error I can't pass by...
      Exception has occurred: ValueError
      "cannot set using a slice indexer with a different length than the value"

      1 Reply Last reply Reply Quote 0
      • 1
        1one last edited by

        Additional Note:
        After some more testing I'm running into the same issue when trying to access bta.ema() and bta.rsi(). Only bta.sma() is working.

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