private static org.jfree.data.time.TimeSeries buildChartTimeSeries(TimeSeries tickSeries, Indicator<Decimal> indicator, String name) {
        org.jfree.data.time.TimeSeries chartTimeSeries = new org.jfree.data.time.TimeSeries(name);
        for (int i = 0; i < tickSeries.getTickCount(); i++) {
            Tick tick = tickSeries.getTick(i);
            chartTimeSeries.add(new Minute(Date.from(tick.getEndTime().toInstant())), indicator.getValue(i).toDouble());
        }
        return chartTimeSeries;
    }
private static org.jfree.data.time.TimeSeries buildChartTimeSeries(TimeSeries tickSeries, Indicator<Decimal> indicator, String name) {
        org.jfree.data.time.TimeSeries chartTimeSeries = new org.jfree.data.time.TimeSeries(name);
        for (int i = 0; i < tickSeries.getTickCount(); i++) {
            Tick tick = tickSeries.getTick(i);
            chartTimeSeries.add(new Minute(Date.from(tick.getEndTime().toInstant())), indicator.getValue(i).toDouble());
        }
        return chartTimeSeries;
    }
private static org . jfree . data . time . TimeSeries buildChartTimeSeries ( TimeSeries tickSeries , Indicator < Decimal > indicator , String name ) { org . jfree . data . time . TimeSeries chartTimeSeries = new org . jfree . data . time . TimeSeries ( name ) ; for ( int i = 0 ; i < tickSeries . getTickCount ( ) ; i ++ ) { Tick tick = tickSeries . getTick ( i ) ; chartTimeSeries . add ( new Minute ( Date . from ( tick . getEndTime ( ) . toInstant ( ) ) ) , indicator . getValue ( i ) . toDouble ( ) ) ; } return chartTimeSeries ; }
Builds a JFreeChart time series from a Ta4j time series and an indicator.
@param tickSeries the ta4j time series
@param indicator the indicator
@param name the name of the chart time series
@return the JFreeChart time series
Builds a JFreeChart time series from a Ta4j time series and an indicator .