private bool isFirstOnBorder(Exchange exchange, DateTime date)
 {
     return(exchange.ExchangeDateTimeUTC(date, exchange.EndTime) >= HistoryDataSeries.GetTimeUtc(0));
 }
 private bool isBetweenBorder(Exchange exchange, DateTime date, int rightOffset, int leftOffset)
 {
     return(exchange.ExchangeDateTimeUTC(date, exchange.EndTime) >= HistoryDataSeries.GetTimeUtc(leftOffset) && exchange.ExchangeDateTimeUTC(date, exchange.BeginTime) <= HistoryDataSeries.GetTimeUtc(rightOffset));
 }
 private bool isRightBorder(Exchange exchange, int i, DateTime date)
 {
     return(exchange.ExchangeDateTimeUTC(date, exchange.EndTime) <= HistoryDataSeries.GetTimeUtc(i) && exchange.ExchangeDateTimeUTC(date, exchange.EndTime) > HistoryDataSeries.GetTimeUtc(i + 1));
 }