/// <summary> /// the Length of Real Body /// </summary> /// <param name="bar">candlestick</param> /// <returns></returns> public static double RealBody(this IPriceOC bar) => Math.Abs(bar.Close - bar.Open);
/// <summary> /// the Bottom of Real Body /// </summary> /// <param name="bar">candlestick</param> /// <returns></returns> public static double Bottom(this IPriceOC bar) => Math.Min(bar.Close, bar.Open);
public static bool IsBearish(this IPriceOC bar) => bar.Close < bar.Open;
/// <summary> /// the Top of Real Body /// </summary> /// <param name="bar">candlestick</param> /// <returns></returns> public static double Top(this IPriceOC bar) => Math.Max(bar.Close, bar.Open);
public static bool IsBullish(this IPriceOC bar) => bar.Close > bar.Open;