kylejusticemagnuson / pyti

Python library of various financial technical indicators
MIT License
646 stars 169 forks source link

Aroon indicators correction #7

Closed hylden90 closed 6 years ago

hylden90 commented 6 years ago

Hi, thanks for sharing your work.

I'm proposing here a correction to Aroon Indicators as follows:

According to: https://www.tradesignalonline.com/en/lexicon/view.aspx?id=AROON+Up%2FDown+Indicator+(AROON) http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:aroon https://www.tradingview.com/wiki/Aroon#CALCULATION and to the formula provided in the code "AROONDWN = (((PERIOD) - (PERIODS SINCE PERIOD LOW)) / (PERIOD)) * 100" Numerator calculation should be: period - (period - index_of_maxormin_value) not just (period - index_of_maxormin_value)

I used a reversed version of the list to fix the calculation in both Indicators. Python 2 and 3 compatible.

kylejusticemagnuson commented 6 years ago

Hi @hylden90, thanks for the PR. I'll take a look within the next day.

kylejusticemagnuson commented 6 years ago

Hi @hylden90,

Thanks for the correction.

hylden90 commented 6 years ago

Hi, thanks for checking, I'm happy to help.