public (DateTime start, DateTime endExclusive) LongRangeForDate(DateTime date, TimeFrame timeFrame) { switch (timeFrame.Name) { case "m1": return(DateRangeUtils.GetMonths(date)); case "h1": return(DateRangeUtils.GetYear(date)); default: throw new NotImplementedException(); } }
public (DateTime start, DateTime endExclusive) ShortRangeForDate(DateTime date, TimeFrame timeFrame) { switch (timeFrame.Name) { case "m1": return(DateRangeUtils.GetDays(date, 1)); case "h1": return(DateRangeUtils.GetMonths(date)); //return (new DateTime(date.Year, date.Month, 1, 0, 0, 0, DateTimeKind.Utc), new DateTime(date.Year, date.Month, DateTime.DaysInMonth(date.Year, date.Month), 23, 0, 0, DateTimeKind.Utc)); default: throw new NotImplementedException(); } }