bukosabino / ta

Technical Analysis Library using Pandas and Numpy
https://technical-analysis-library-in-python.readthedocs.io/en/latest/
MIT License
4.26k stars 874 forks source link

Runtime warning when calculating ADX #139

Open Hamish-Gibson opened 4 years ago

Hamish-Gibson commented 4 years ago

I am trying to compute the ADX however I am receiving a runtime warning error on line 567 and 571:

ta\trend.py:567: RuntimeWarning: invalid value encountered in double_scalars
  dip[i] = 100 * (self._dip[i]/self._trs[i]) 

ta\trend.py:571: RuntimeWarning: invalid value encountered in double_scalars
  din[i] = 100 * (self._din[i]/self._trs[i])
bukosabino commented 4 years ago

It is just a warning, you can work with this warning. I will fix ASAP.

Best, Dario