Skip to content

Candle functions - CDL3BLACKCROWS not working well... #250

@Clementstore

Description

@Clementstore

Dear,

I tried out the CDL3BLACKCROWS function using the following codes. But it doesnt seem to work well..?
I am using talib 0.4.17


from plotly.offline import plot
import plotly.graph_objs as go
import pandas as pd
import talib as ta
import re 
import numpy as np

o = np.array([ 39.00, 39.00, 39.00, 39.00, 40.32, 40.51, 38.09, 35.00, 27.66, 30.80, 39.00, 39.00, 39.00, 39.00, 40.51, 38.09, 35.00, 27.66, 30.80])
h = np.array([ 40.84, 39.00, 40.84, 40.84, 41.69, 40.84, 38.12, 35.50, 31.74, 32.51, 40.84, 39.00, 40.84, 40.84, 40.84, 38.12, 35.50, 31.74, 32.51])
l = np.array([ 35.80, 35.80, 35.80, 35.80, 39.26, 36.73, 33.37, 30.03, 27.03, 28.31, 35.80, 35.80, 35.80, 35.80, 36.73, 33.37, 30.03, 27.03, 28.31])
c = np.array([ 40.29, 40.29, 40.29, 40.29, 40.46, 37.08, 33.37, 30.03, 31.46, 28.31, 40.29, 40.29, 40.29, 40.29, 37.08, 33.37, 30.03, 31.46, 28.31])

print('CDL3BLACKCROWS ', ta.CDL3BLACKCROWS(o, h, l, c))

trace = go.Candlestick( #x= pd.to_datetime(dfohlc.index.values),
            open=o,
            high=h,
            low=l,
            close=c)
data = [trace]

plot(data, filename='go_candle1.html')

The run results is:
CDL3BLACKCROWS [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -100 0 0]

And this only shows signal in index 17. Shouldnt it show in index 7 too...?
Thanks so much.. I spent days figuring it out but in vain.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions