Class DurationBarAggregator
- java.lang.Object
-
- tech.cassandre.trading.bot.util.ta4j.DurationBarAggregator
-
- All Implemented Interfaces:
BarAggregator
public class DurationBarAggregator extends Object implements BarAggregator
Implementation of theBarAggregator
based onDuration
.
-
-
Constructor Summary
Constructors Constructor Description DurationBarAggregator(Duration barDuration)
Creates the Aggregator with the givenDuration
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Flux<org.ta4j.core.Bar>
getBarFlux()
Gets theFlux
.void
update(ZonedDateTime timestamp, Number latestPrice)
Updates the bar data.
-
-
-
Method Detail
-
update
public void update(ZonedDateTime timestamp, Number latestPrice)
Updates the bar data.- Specified by:
update
in interfaceBarAggregator
- Parameters:
timestamp
- time of the ticklatestPrice
- latest price
-
getBarFlux
public reactor.core.publisher.Flux<org.ta4j.core.Bar> getBarFlux()
Gets theFlux
.- Specified by:
getBarFlux
in interfaceBarAggregator
- Returns:
- flux of Bars
-
-