code: private static TimeSeries initMovingTimeSeries(int maxTickCount) {
          TimeSeries series = CsvTradesLoader.loadBitstampSeries();
          System.out.print("Initial tick count: " + series.getTickCount());
          // Limitating the number of ticks to maxTickCount
          series.setMaximumTickCount(maxTickCount);
          LAST_TICK_CLOSE_PRICE = series.getTick(series.getEndIndex()).getClosePrice();
          System.out.println(" (limited to " + maxTickCount + "), close price = " + LAST_TICK_CLOSE_PRICE);
          return series;
      }
docs: Builds a moving time series (i.e. keeping only the maxTickCount last ticks)
  @param maxTickCount the number of ticks to keep in the time series (at maximum)
  @return a moving time series