[Python] TA-lib is not properly detecting Engulfing candle

Discussão em 'Python' iniciado por Stack, Março 3, 2025.

  1. Stack

    Stack Membro Participativo

    As you see in the attached image, there was a Bearish Engulfing candle on December 18. [​IMG]

    But when I see the same data and engulfing value, it shows something else, in fact 0.

    Below is the function computing, detecting engulfing candle pattern:

    def detect_engulfing_pattern(tsla_df):
    df = tsla_df.rename(columns={"Open": "open", "High": "high", "Low": "low", "Close": "close"})
    df['engulfing'] = talib.CDLENGULFING(df['open'], df['high'], df['low'], df['close'])
    return df


    [​IMG]

    Continue reading...

Compartilhe esta Página