TA-Lib / ta-lib-python

Python wrapper for TA-Lib (http://ta-lib.org/).
http://ta-lib.github.io/ta-lib-python
Other
9.27k stars 1.72k forks source link

Question: How to add RMA indicator #568

Closed haljishi closed 1 year ago

haljishi commented 1 year ago

How to add RMA indicator ? I don't see it bulit in in ta lib

https://www.tradingcode.net/tradingview/relative-moving-average/

trufanov-nok commented 1 year ago

TradingView's RMA is equal to TDA's Wilders() and equal to TA-Lib's EMA with #define PER_TO_K( per ) ((double)1.0 / (double)(per)) instead of #define PER_TO_K( per ) ((double)2.0 / ((double)(per + 1)))

If you don't need EMA or any indicator that is based on EMA, you may edit this line in ta-lib/c/src/ta_func/ta_utility.h and rebuild the ta-lib. And EMA become RMA.

haljishi commented 1 year ago

thank you so much for your help