ta-lib-python icon indicating copy to clipboard operation
ta-lib-python copied to clipboard

Q: what does CDL2CROWS return value -100 and 100 stands for?

Open mw66 opened this issue 9 months ago • 7 comments

https://github.com/TA-Lib/ta-lib-python/blob/2ffcf42b8313559a72982ee564bfdb12183e8876/talib/_func.pxi#L776

0 means no pattern detected.

but what does CDL2CROWS return value -100 and 100 stands for?

Thanks.

mw66 avatar Feb 24 '25 02:02 mw66

It looks like perhaps it only returns 0 or -100:

https://github.com/TA-Lib/ta-lib/blob/main/src/ta_func/ta_CDL2CROWS.c#L225

mrjbq7 avatar Feb 24 '25 02:02 mrjbq7

But I do see others e.g: CDLXSIDEGAP3METHODS return 3 values:

np.unique(candles) = array([-100, 0, 100]

so, in general, what does -100 and 100 stands for respectfully?

mw66 avatar Feb 24 '25 02:02 mw66

Well there are also -200 and 200.

In general, it's supposed to represent bearish for negative and bullish for positive.

And I think -200 and +200 are meant to be "confirmation" signals.

mrjbq7 avatar Feb 24 '25 02:02 mrjbq7

ok, these values should be in the README as guide, e.g.

https://github.com/TA-Lib/ta-lib/blob/main/src/ta_func/ta_CDLXSIDEGAP3METHODS.c#L215

mw66 avatar Feb 24 '25 02:02 mw66

PR's welcome!

mrjbq7 avatar Feb 24 '25 02:02 mrjbq7

Well, only if I know enough about these values myself, e.g. so CDLXSIDEGAP3METHODS can be both bullish and bearish?

mw66 avatar Feb 24 '25 02:02 mw66

Apparently!

I’m not trying to be difficult, but the authority for what each returns is in the C source code.

There are also some candle settings that determine aspects of the CDL algorithms.

mrjbq7 avatar Feb 24 '25 02:02 mrjbq7