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/

    Envelope indicators are not available, can't pass params

    General Code/Help
    2
    4
    51
    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.
    • MrKalindro
      MrKalindro last edited by

      Hello guys! I'm still quite a noob but I have some issues with backtrader, I already inspected some posts and I can see people easily using for example

      emamean = bt.indicators.AdaptiveMovingAverageEnvelope(period=30, fast=1, slow=8, perc=0.2, plotname='mean')
      

      When I try to pass that it says "Cannot find reference AdaptiveMovingAverageEnvelope in init.py"

      Even when I try to pass arguments to

      sma1, sma2 = bt.indicators.MovingAverageSimple(period=10), bt.ind.SMA(period=30)
      

      It says that the period is an unexpected argument.

      I have my whole backtesting environment ready but the indicator that I struggle with, I have data upload and the rest figured out. I have python 3.7.9 and the newest backtrader version on Pycharm 2020.2

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

        I just found some topic about pycharm with backtrader.

        "Developing Coder 1 Jun 2019, 18:11
        Wouldn't recommend PyCharm although I use it myself.

        BackTrader is a bag of tricks with a hack on top and PyCharm's tools don't play well with that. Half of your code will be highlighted as problematic, autocomplete rarely works and you can't ask which parameters a function takes.

        If I wasn't so used to PyCharm, I'd probably go with Sublime Text."

        Does it mean I'm not retarded and I spent the last few days trying to figure it out where it's not my issue actually?

        1 Reply Last reply Reply Quote 0
        • A
          ab_trader last edited by

          @MrKalindro said in Envelope indicators are not available, can't pass params:

          When I try to pass that it says "Cannot find reference AdaptiveMovingAverageEnvelope in init.py"
          Even when I try to pass arguments to

          No issues with VS Code and plain python.

          1 Reply Last reply Reply Quote 1
          • MrKalindro
            MrKalindro last edited by

            Yeah thanks @ab_trader it's Pycharm or other big IDE's thing. It's just notification errors, the script runs smoothly but the autofill doesn't work with many commands. Just gotta know that it's a thing and not worry about ugly prompts.

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Copyright © 2016, 2017, 2018 NodeBB Forums | Contributors
            $(document).ready(function () { app.coldLoad(); }); }