I noticed that the above method never returns 'false' and so cannot indicate bearish signals. The source code is as follows:
```
/// <summary> /// Whether the candle is bullish or bearish. /// </summary> /// <param name="candle">The candle which should be checked for the trend.</param> /// <returns><see langword="true" /> if bullish, <see langword="false" />, if bearish, <see langword="null" /> - neither one nor the other.</returns> public static bool? IsBullishOrBearish(this Candle candle) { if (candle == null) throw new ArgumentNullException(nameof(candle));
var isWhiteOrBlack = candle.IsWhiteOrBlack();
switch (isWhiteOrBlack)
{
case true:
if (candle.GetBottomShadow() >= candle.GetBody())
return true;
break;
case false:
if (candle.GetTopShadow() >= candle.GetBody())
return true;
break;
}
return null;
}
I'm guessing that the second case should return 'false' . It looks to me like the top case is looking for an inverted hammer (bullish), whereas the bottom case is looking for a shooting star (bearish). However shouldn't it also be looking at the other shadows in each case since we want a short shadow opposite the long shadows for both inverted hammer and shooting start right?? Am I missing something?
Kommentare (1)
Anmelden oder Konto erstellen, Melden Sie sich an oder registrieren Sie sich, um einen Kommentar zu hinterlassen
I think you right. There is no code line for false return. It is definitely wrong.