Skip to content

Bullish Hammer calculation is incorrect #250

@ricardonunesdev

Description

@ricardonunesdev

Hi @anandanand84 and @marcus-n3rd,

I love this module, but it looks like your Bullish Hammer calculation is incorrect.

File: technicalindicators/src/candlestick/BullishHammerStick.ts (link)
Line: 18

isBullishHammer = isBullishHammer && (daysClose - daysOpen) <= 2 * (daysOpen - daysLow);

This means that the body should be twice the size of the wick (body <= 2 * wick).

It should be the other way around.

isBullishHammer = isBullishHammer && (daysClose - daysOpen) * 2 <= (daysOpen - daysLow);

Meaning that the wick should be twice the size of the body (2 * body <= wick).

Right?

Best regards,
Ricardo Nunes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions