TA-Lib / ta-lib-python

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

Question: How to add RMA indicator #568

Closed haljishi closed 2 years ago

haljishi commented 2 years 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 2 years 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 2 years ago

thank you so much for your help