Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
TA-Lib Pattern Recognition

I know that Quantopian supports a lot of the TA-Lib methods but does Quantopian support the TA-Lib Pattern Recognition methods as well? (the candlestick patterns, volatility indicators, etc.)

1 response

Hello Michael,

This may give you some ideas.

I've no idea why the window length has to be 14 or more for Three Black Crows but as it was 13 when I tried Two Crows I have a theory, The definition of Three Black Crows in the 'C' source says:

/* Proceed with the calculation for the requested range.
* Must have:
* - three consecutive and declining black candlesticks
* - each candle must have no or very short lower shadow
* - each candle after the first must open within the prior candle's real body
* - the first candle's close should be under the prior white candle's high
* The meaning of "very short" is specified with TA_SetCandleSettings
* outInteger is negative (-1 to -100): three black crows is always bearish;
* the user should consider that 3 black crows is significant when it appears after a mature advance or at high levels,
* while this function does not consider it
*/

and I find this in ta_global.c

/* shadow is very short when it's shorter than 10% the average of the 10 previous candles' high-low range */
{ TA_ShadowVeryShort, TA_RangeType_HighLow, 10, 0.1 },

As Three Black Crows needs the current bar, the three previous and the ten previous to that I assume that's where the 14 comes from. Two Crows needs current, two previous and ten previous to that hence 13. But I could do with confirmation from a TA-Lib expert.

P.