ta4j-examples/src/main/java/ta4jexamples/loaders/CsvTradesLoader.java
private static List<Tick> buildEmptyTicks(ZonedDateTime beginTime, ZonedDateTime endTime, int duration) {

        List<Tick> emptyTicks = new ArrayList<>();

        Duration tickDuration = Duration.ofSeconds(duration);
        ZonedDateTime tickEndTime = beginTime;
        do {
            tickEndTime = tickEndTime.plus(tickDuration);
            emptyTicks.add(new BaseTick(tickDuration, tickEndTime));
        } while (tickEndTime.isBefore(endTime));

        return emptyTicks;
    }
private static List<Tick> buildEmptyTicks(ZonedDateTime beginTime, ZonedDateTime endTime, int duration) {

        List<Tick> emptyTicks = new ArrayList<>();

        Duration tickDuration = Duration.ofSeconds(duration);
        ZonedDateTime tickEndTime = beginTime;
        do {
            tickEndTime = tickEndTime.plus(tickDuration);
            emptyTicks.add(new BaseTick(tickDuration, tickEndTime));
        } while (tickEndTime.isBefore(endTime));

        return emptyTicks;
    }
private static List < Tick > buildEmptyTicks ( ZonedDateTime beginTime , ZonedDateTime endTime , int duration ) { List < Tick > emptyTicks = new ArrayList <> ( ) ; Duration tickDuration = Duration . ofSeconds ( duration ) ; ZonedDateTime tickEndTime = beginTime ; do { tickEndTime = tickEndTime . plus ( tickDuration ) ; emptyTicks . add ( new BaseTick ( tickDuration , tickEndTime ) ) ; } while ( tickEndTime . isBefore ( endTime ) ) ; return emptyTicks ; }
Builds a list of empty ticks.
@param beginTime the begin time of the whole period
@param endTime the end time of the whole period
@param duration the tick duration (in seconds)
@return the list of empty ticks
Builds a list of empty ticks .