Open KashyapCKotak opened 6 years ago
seems correct to me.
The three black crows pattern should ideally consist of three relatively long bodied bearish candlesticks that close at or near the low price for the period. The second candle almost closes near the low
aren't all the candles closing near low?
ok got. It should return true instead it return false. May be it is also expecting high should be near the open.
I tried reducing the middle one to have almost no upper shadow... But it still returned false...
ok I'll check it out.
I see nothing wrong with the input / logic... If I had to guess I bet something is getting reversed before being passed to threeblackcrows... @KashyapCKotak Can you test the same input with the same implementation with threewhitesoldiers just to remove this as a possibility?
Nvm I did it and see they are both false... Weird I will look closer
Okay, the problem is the second day open is EQUAL to the first day close... looks like we need to add >= to the logic test instead of just greater than (edge case but needs to be handled)... but I am not sure what other implications this would bring...
Here is my input: var input = { open: [7707.82, 7684.76, 7675.76], high: [7709.61, 7695.64, 7677.15], close: [7684.76, 7675.04, 7651.54], low: [7682.37, 7672.36, 7647.49] }
Here's how it looks on a graph:
for three black crows: var result = threeblackcrows(input); //returns FALSE shouldn't this return true??