feat: add RMA (Running Moving Average / Wilder's Smoothing) indicator#743
Open
mac-agent wants to merge 1 commit intofreqtrade:mainfrom
Open
feat: add RMA (Running Moving Average / Wilder's Smoothing) indicator#743mac-agent wants to merge 1 commit intofreqtrade:mainfrom
mac-agent wants to merge 1 commit intofreqtrade:mainfrom
Conversation
Implements TradingView Pine Script ta.rma() equivalent. RMA is also known as Wilder's Moving Average and is equivalent to an EMA with alpha = 1/period. This is a commonly requested indicator used in RSI calculations and other technical analysis. Fixes freqtrade#141
xmatthias
requested changes
Mar 31, 2026
Member
xmatthias
left a comment
There was a problem hiding this comment.
I'd want to have a test in test_indicators_generic for this, too.
That test ensures the interface is aligned with the others. You'll have to refresh the snapshots - but that's no issue, really.
We'll also want to add it to the index / docs page - otherwise it'll be code that nobody knows about.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the RMA (Running Moving Average) indicator, implementing the equivalent of TradingView Pine Script
ta.rma().Fixes #141.
What is RMA?
RMA is also known as Wilder's Smoothing Average. It's used extensively in technical analysis — most notably in RSI calculations, ADX, and other Wilder-derived indicators.
Formula: RMA is equivalent to an EMA with
alpha = 1/period:RMA = (prev_RMA * (period - 1) + current) / periodImplementation
ewm(alpha=1/period, adjust=False, min_periods=period).mean()for efficient vectorized computationdataframe, period, field)overlap_studies.pyalongside other moving averagesTesting
Added
test_rmawith 3 assertions: