Skip to content

Candlesticks pattern recognition 0.4.10 is incorrect #119

Description

@bkcollection

I found that CDLHAMMER,CDLDOJI and CDLSHOOTINGSTAR are incorrect.
This is data for KESM, A stock from KLSE Malaysia.

Date,Stock,Open,High,Low,Close,Volume
2016-09-29,KESM,7.92,7.98,7.92,7.97,149400
2016-09-30,KESM,7.96,7.97,7.84,7.9,29900
2016-10-04,KESM,7.8,7.94,7.8,7.93,99900
2016-10-05,KESM,7.93,7.95,7.89,7.93,77500
2016-10-06,KESM,7.93,7.93,7.89,7.92,130600
2016-10-07,KESM,7.91,7.94,7.91,7.92,103000

ta.CDLHAMMER(o,h,l,c) and I got a 100 signal.
I am using python, pandas web.datareader to grab data from google(this is a Malaysia stock, so put KLSE: to grab the data)
It CDLHAMMER shows that there is a hammer signal on Oct 07. This is incorrect. It is more look like shooting star more but shooting star must be in a uptrend.
First, this is not a downtrend for fulfil hammer characteristic. the wicks is below the body.
Second, the wicks must be at least 2 times the body (white or black)
This KESM, does not in downtrend. It also open and close at the same price. The wicks is above the body. This is not the only case, it is just an example from many cases.

ta.CDLSHOOTINGSTAR(o,h,l,c) for another two stocks also incorrect. Shooting star definition:

  1. happen in uptrend
  2. wicks is 2 times body where wicks is above the body(white or black)
2016-09-30,PBBANK,19.86,20.0,19.78,19.82,8007100
2016-10-04,PBBANK,19.92,19.92,19.82,19.88,5551100
2016-10-05,PBBANK,19.96,19.96,19.84,19.92,7949300
2016-10-06,PBBANK,19.96,19.98,19.9,19.96,5000900
2016-10-07,PBBANK,19.96,19.96,19.86,19.88,5598000
2016-09-28,MFLOUR,1.52,1.53,1.49,1.5,274600
2016-09-29,MFLOUR,1.5,1.52,1.5,1.52,52400
2016-09-30,MFLOUR,1.5,1.5,1.49,1.49,111000
2016-10-04,MFLOUR,1.49,1.5,1.48,1.48,220900
2016-10-05,MFLOUR,1.48,1.5,1.48,1.48,45200
2016-10-06,MFLOUR,1.48,1.49,1.46,1.48,163300
2016-10-07,MFLOUR,1.48,1.48,1.42,1.42,643800

MFLOUR is in downtrend, and it has a long black body with no wicks, it is not a shooting star.
PBBANK is sideway, and also look like a hammer as the wicks is below the body.

Is t something I implement wrongly or the candlectisls pattern recognition really inaccurate?
I check on RIS,MACD all the data looks correct.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions