Skip to content

Feature Request: Relative Moving Average (RMA) #664

@ozum

Description

@ozum

Hi,

Thanks for this well-thought library.

Is it possible to add RMA to the library and support it in DMI and ADX? TradingView uses RMA in indicators such as DX, ADX, etc.

I use TradingView to check my strategies visually and then code them in Node.js. The lack of RMA causes different results for DMI and ADX in my scripts.

Below is the Pine Script code for RMA taken from TradingView:

pine_rma(src, length) =>
    alpha = 1/length
    sum = 0.0
    sum := na(sum[1]) ? ta.sma(src, length) : alpha * src + (1 - alpha) * nz(sum[1])

Thanks in advance,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions