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/

    Indicator Addition Request for alternate smma:

    Indicators/Strategies/Analyzers
    3
    6
    131
    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.
    • I
      incabot last edited by

      Hello, I was curious if you would consider adding this alternate smma indicator to the library. Or perhaps a little advice if one of the current versions can produce the same output.

      The smma I am referring is from the pyti TA library, and it really just boils down to having used this specific average for a strategy and no other way to get exact values.

      Here is the indicator from the pyti library.

      code-snapshot2.png

      Thanks for your consideration!

      run-out 1 Reply Last reply Reply Quote 0
      • run-out
        run-out @incabot last edited by

        @incabot Have you looked at this?

        RunBacktest.com

        I 1 Reply Last reply Reply Quote 1
        • I
          incabot @run-out last edited by

          @run-out Ya, I have. When I was first studying up on backtrader, seeing that smma in BT library had me really excited. However, I spent nearly all weekend trying every permutation and combination of it and other MA's and have so far had no luck reproducing my values. On top of that, it truly is the most important calculation in my system and required.

          I know its just ridiculous to request its addition since surely I might be the only one to use it. But figured I'd look into it. Anyway, not giving up yet. I will continue playing around with current options until it burns me out.

          Thanks for the feedback!

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

            You can write an indicator by yourself and add it to to bt run without adding this indicator to the bt package. It will be faster.

            • If my answer helped, hit reputation up arrow at lower right corner of the post.
            • Python Debugging With Pdb
            • New to python and bt - check this out
            I 1 Reply Last reply Reply Quote 1
            • I
              incabot @ab_trader last edited by

              @ab_trader OK. Like I am sure far too much work actually goes into indicator additions than I can even comprehend, so I was really hoping there to be a better solution.

              I'll look into some examples as you've suggested to add indicators. TBH, I hadn't exactly considered that option trying to get things working with what exists already.

              Originally I thought the descrepancy in values was too great to be accounted for in the slight variations of daily candle closes from 1 min resampling. But digging deeper I need to rule that out as well. My daily candles 'could' be using previous day close as open Im not sure what's happening there exactly.

              I Appreciate the feedback! Cheers

              run-out 1 Reply Last reply Reply Quote 0
              • run-out
                run-out @incabot last edited by

                @incabot @ab_trader is correct and making custom indicators is really common for backtests.

                I would point out though that since you are already creating a pandas Series/numpy result, you could just add this to your OHLCV in a pandas dataframe and then add that to the backtest. Might be the easiest and most assured way to solve your problem.

                RunBacktest.com

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