Open sivaraj-v opened 5 years ago
Kinda late, but the way the patterns were coded, in this case it's all three:
let isBearishSpinningTop = bodyLength < upperShadowLength &&
bodyLength < lowerShadowLength;
let isBullishSpinningTop = bodyLength < upperShadowLength &&
bodyLength < lowerShadowLength;
let doji = (isOpenEqualsClose && isHighEqualsOpen == isLowEqualsClose);
In terms of fundamentals, they're quite similar in that they indicate neutrality or indecision, but generally spinning tops' bodies are larger whereas doji's are narrower. Spinning tops always has long legs on either side, indicating a large variance in the high and low.
Logic should have been implemented so that it correctly recognize which of these three fits the mold better.
If I understood the patterns correctly isBearishSpinningTop shall return true if candle is red and isBullishSpinningTop shall return true if candle is green.
Though I get some cases where both patterns return true.
Input for the candle
var input = { open: [201], high: [201.25], close: [200.8], low: [200] };
Output for the input:![image](https://user-images.githubusercontent.com/6199252/60664946-cdf68b00-9e80-11e9-9194-f3c12599f00f.png)
Now my question is, candle belongs to which pattern ?
Doji or Bullish Spinning Top or Bearish Spinning Top