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 .