/// <summary> /// Whether the candle is hammer. /// </summary> /// <param name="candle">The candle which should match the pattern.</param> /// <returns><see langword="true" /> if it is matched, <see langword="false" /> if not.</returns> public static bool IsHammer(this Candle candle) { return(!candle.IsMarubozu() && (candle.GetBottomShadow() == 0 || candle.GetTopShadow() == 0)); }
/// <summary> /// Whether the candle is neutral to trades. /// </summary> /// <param name="candle">The candle for which you need to calculate whether it is neutral.</param> /// <returns><see langword="true" /> if the candle is neutral, <see langword="false" /> if it is not neutral.</returns> /// <remarks> /// The neutrality is defined as a situation when during the candle neither buyers nor sellers have not created a trend. /// </remarks> public static bool IsSpinningTop(this Candle candle) { return(!candle.IsMarubozu() && (candle.GetBottomShadow() == candle.GetTopShadow())); }