ta4j/src/main/java/eu/verdelhan/ta4j/analysis/CashFlow.java
private void fillToTheEnd() {
        if (timeSeries.getEndIndex() >= values.size()) {
            Decimal lastValue = values.get(values.size() - 1);
            values.addAll(Collections.nCopies(timeSeries.getEndIndex() - values.size() + 1, lastValue));
        }
    }
private void fillToTheEnd() {
        if (timeSeries.getEndIndex() >= values.size()) {
            Decimal lastValue = values.get(values.size() - 1);
            values.addAll(Collections.nCopies(timeSeries.getEndIndex() - values.size() + 1, lastValue));
        }
    }
Fills with last value till the end of the series.