Class BarContext
- java.lang.Object
-
- tech.cassandre.trading.bot.util.ta4j.BarContext
-
public class BarContext extends Object
BarContext represents a transient state of the bar being built. Please note, that the computations are done in doubles.
-
-
Constructor Summary
Constructors Constructor Description BarContext(Duration newDuration, ZonedDateTime newStartTime, Number newLow, Number newHigh, Number newOpen, Number newClose, Number newVolume)
Bar context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(Object other)
boolean
equals(Object o)
double
getClose()
Close price.Duration
getDuration()
The duration.ZonedDateTime
getEndTime()
The end time.double
getHigh()
High price.double
getLow()
Low price.double
getOpen()
Open price.ZonedDateTime
getStartTime()
The start time.double
getVolume()
Volume.int
hashCode()
boolean
isAfter(ZonedDateTime timestamp)
void
update(Number newLow, Number newHigh, Number newClose, Number newVolume)
-
-
-
Constructor Detail
-
BarContext
public BarContext(Duration newDuration, ZonedDateTime newStartTime, Number newLow, Number newHigh, Number newOpen, Number newClose, Number newVolume)
Bar context. The bar is constructed after the time has finished.- Parameters:
newDuration
- the durationnewStartTime
- start time of the barnewLow
- low pricenewHigh
- high pricenewOpen
- open pricenewClose
- close pricenewVolume
- volume
-
-
Method Detail
-
isAfter
public final boolean isAfter(ZonedDateTime timestamp)
-
getDuration
public Duration getDuration()
The duration.
-
getStartTime
public ZonedDateTime getStartTime()
The start time.
-
getEndTime
public ZonedDateTime getEndTime()
The end time.
-
getLow
public double getLow()
Low price.
-
getHigh
public double getHigh()
High price.
-
getOpen
public double getOpen()
Open price.
-
getClose
public double getClose()
Close price.
-
getVolume
public double getVolume()
Volume.
-
canEqual
protected boolean canEqual(Object other)
-
-