-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please add tradingview RMA indicator #141
Comments
hm, based on the description, it might be something around the following: dataframe['rsi'] = ta.RSI(dataframe)
# Either ta-lib
dataframe['rma'] = ta.EMA(dataframe, price='rsi')
# or native pandas
dataframe['rma'] = dataframe['rsi'].rolling(window).ewm() Now the big problem is how the EMA is calculated. I'm also not sure how ta-lib calculates it precisely - and their docs in this regards is quite lacking. |
Unfortunately it doesn't give correct results. Example: close = np.array([4086.29, 4310.01, 4509.08, 4130.37, 3699.99, 3660.02, 4378.48, 4640.0, 5709.99, 5950.02])
# with period=3 on tradingview rma(close, 3) will give following results
rma = np.array([np.nan, np.nan, 4301.79333333, 4244.65222222, 4063.09814815, 3928.73876543, 4078.65251029, 4265.76834019, 4747.17556013, 5148.12370675]) |
As mentioned above - the parameters for the |
You could try this library instead and see if it gives better results: https://technical-analysis-library-in-python.readthedocs.io/en/latest/ta.html |
Any update on this? |
@2W-12 The following is pretty close to what you want:
Result:
|
TradingView forces the first entry to be the SMA of the first n entries, so the following leads to exactly the same result:
Result:
|
Hi,
any ideas how to implement TradingView Pine RMA ?
The text was updated successfully, but these errors were encountered: