twopirllc / pandas-ta

Technical Analysis Indicators - Pandas TA is an easy to use Python 3 Pandas Extension with 150+ Indicators
https://twopirllc.github.io/pandas-ta/
MIT License
5.21k stars 1.01k forks source link

`CDL_INSIDE` indicator needs to be rescaled by factor 100 for consistency reasons #704

Closed JanHomann closed 8 months ago

JanHomann commented 1 year ago

pandas-ta 0.3.14b0 TA-Lib 0.4.27

Problem Description

The current implementation of cdl_z() often creates low values that are higher than the open, close or high and high values that are lower than the open, close or low.

Example

data_candles = data.ta.cdl_pattern(name="all")

>>> data_candles['CDL_INSIDE'].max()
1

>>> data_candles['CDL_INSIDE'].min()
-1

# every other indicator
>>> data_candles['CDL_HAMMER'].max()
100

Expected Behavior

'CDL_INSIDE' should return +100 and -100 like all other indicators. Alternative: Each indicator returns +1 and/or -1.

sampanacharya commented 1 year ago

Hi @JanHomann I have fixed this issue and submitted a pull request regarding this issue, can you review if. Thanks

JanHomann commented 1 year ago

Hi @sampanacharya, very cool! πŸ™‚πŸ‘. Thank you πŸ™. I can’t approve pull requests here. But for example @twopirllc can for sure.

JanHomann commented 1 year ago

Actually, I just realize that the problem description I put there is nonsense. But the title says it all. It seems I accidentally copied it from another issue that I created.

twopirllc commented 1 year ago

Hi @JanHomann,

Should be fixed as well as faster. Available on the development branch.

Kind Regards, KJ