Example #1
0
 /// <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);
Example #2
0
 /// <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);
Example #3
0
 public static bool IsBearish(this IPriceOC bar) => bar.Close < bar.Open;
Example #4
0
 /// <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);
Example #5
0
 public static bool IsBullish(this IPriceOC bar) => bar.Close > bar.Open;