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



  • 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



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



  • @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.



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


Log in to reply
 

});