Indicator Addition Request for alternate smma:
-
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.
Thanks for your consideration!
-
-
@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!
-
You can write an indicator by yourself and add it to to
bt
run without adding this indicator to thebt
package. It will be faster. -
@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
-
@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.