public low_to_historical_lowest(kdata series, DateTime since) : base(series) { var s = series.Where(p1 => p1.date >= since); if (s.Any()) { var current = series.Last(); var lowest = s.Min(p1 => p1.low); value = Math.Truncate((current.low / lowest - 1) * 100); } }
public jun_xian_dou_tout(kdata series) : base(series) { if (series.Any()) { var current = series.Last(); var ma5 = (double)new MA(series.close(), 5); var ma30 = (double)new MA(series.close(), 30); var ma55 = (double)new MA(series.close(), 55); var ma120 = (double)new MA(series.close(), 120); value = ma5 >= ma30 && ma30 >= ma55 && ma55 >= ma120; } }