technicalindicators icon indicating copy to clipboard operation
technicalindicators copied to clipboard

Bullish / Bearish Harami always triggers with Bullish / Bearish Harami Cross

Open JMoli opened this issue 6 years ago • 4 comments

Something I noticed fixing #115 . If Bullish / Bearish Harami Cross is true so will Bullish / Bearish Harami .. not sure if this is desirable?

JMoli avatar Mar 23 '18 21:03 JMoli

@JMoli Do you mean it is a bug or by the definition both will trigger at the same time?

anandanand84 avatar Mar 26 '18 15:03 anandanand84

@anandanand84 By definition both will trigger at the same time... but still most likely a bug.. Just need to add

let isSecondDayDoji = this.approximateEqual(seconddaysOpen, seconddaysClose); return (isBullishHaramiPattern && !isSecondDayDoji);

The key being to negate isSecondDayDoji . I think it is a bug because techinically the candle is one or the other not both a HaramiCross and a Harami, but this may be subjective thinking? Let me know what you think.

JMoli avatar Mar 26 '18 16:03 JMoli

@JMoli I do not use Candlestick Harami, now you are in a much better position to take that call, whatever you think should do, just add it to the existing pull request and I'll merge.

Thank you for contributing.

anandanand84 avatar Mar 26 '18 16:03 anandanand84

Actually I think we have this issue for lot of candlesticks which are similar. Have to go through all the candlesticks once again.

anandanand84 avatar Mar 26 '18 19:03 anandanand84