ta4j v0.12 Release Notes
Release Date: 2018-09-10 // over 5 years ago-
💥 Breaking:
Decimal
class has been replaced by newNum
interface. Enables usingDouble
,BigDecimal
and custom data types for calculations.- Big changes in
TimeSeries
andBaseTimeSeries
. Multiple newaddBar(..)
functions inTimeSeries
allow to add data directly to the series
🛠 Fixed
- TradingBotOnMovingTimeSeries: fixed calculations and ArithmeticException Overflow
- 🛠 Fixed wrong indexing in:
Indicator.toDouble()
. - PrecisionNum.sqrt(): using DecimalFormat.parse().
- RandomWalk[High|Low]Indicator: fixed formula (max/min of formula with n iterating from 2 to barCount)
🔄 Changed
- ALL INDICATORS:
Decimal
replaced byNum
. - ALL CRITERION: Calculations modified to use
Num
. - AbstractIndicator: new
AbstractIndicator#numOf(Number n)
function as counterpart of droppedDecimal.valueOf(double|int|..)
- TimeSeries | Bar: preferred way to add bar data to a
TimeSeries
is directly to the series via newTimeSeries#addBar(time,open,high,..)
functions. It ensures to use the correctNum
implementation of the series - ✅ XlsTestsUtils: now processes xls with one or more days between data rows (daily, weekly, monthly, etc). Also handle xls #DIV/0! calculated cells (imported as NaN.NaN)
- CachedIndicator: Last bar is not cached to support real time indicators
- *TimeSeries | Bar *: added new
#addPrice(price)
function that adds price to (last) bar. - Parameter timeFrame renamed to barCount.
- Various Rules: added constructor that provides
Number
parameters - AroonUpIndicator: redundant TimeSeries call was removed from constructor
- AroonDownIndicator: redundant TimeSeries call was removed from constructor
- BaseTimeSeries: added setDefaultFunction() to SeriesBuilder for setting the default Num type function for all new TimeSeries built by that SeriesBuilder, updated BuildTimeSeries example
- ✅ CriterionTest: changed from explicit constructor calls to
AbstractCriterionTest.getCriterion()
calls. - ChopIndicator: transparent fixes
- StochasticRSIIndicator: comments and params names changes to reduce confusion
- ConvergenceDivergenceIndicator: remove unused method
- ✅ ChopIndicatorTest: spelling, TODO: add better tests
- Various Indicators: remove double math operations, change
Math.sqrt(double)
toNum.sqrt()
, other small improvements - RandomWalk[High|Low]Indicator: renamed to
RWI[High|Low]Indicator
➕ Added
- BaseTimeSeries.SeriesBuilder: simplifies creation of BaseTimeSeries.
- Num: Extracted interface of dropped
Decimal
class - DoubleNum:
Num
implementation to support calculations based ondouble
primitive - BigDecimalNum: Default
Num
implementation ofBaseTimeSeries
- DifferencePercentageIndicator: New indicator to get the difference in percentage from last value
- PrecisionNum:
Num
implementation to support arbitrary precision - ✅ TestUtils: removed convenience methods for permuted parameters, fixed all unit tests
- ✅ TestUtils: added parameterized abstract test classes to allow two test runs with
DoubleNum
andBigDecimalNum
- ChopIndicator new common indicator of market choppiness (low volatility), and related 'ChopIndicatorTest' JUnit test and 'CandlestickChartWithChopIndicator' example
- BollingerBandWidthIndicator: added missing constructor documentation.
- BollingerBandsLowerIndicator: added missing constructor documentation.
- BollingerBandsMiddleIndicator: added missing constructor documentation.
- TrailingStopLossRule: new rule that is satisfied if trailing stop loss is reached
- Num: added Num sqrt(int) and Num sqrt()
- pom.xml: added support to generate ta4j-core OSGi artifact.
✂ Removed/Deprecated
- Decimal: removed. Replaced by
Num
interface - TimeSeries#addBar(Bar bar): deprecated. Use
TimeSeries#addBar(Time, open, high, low, ...)
- BaseTimeSeries: Constructor
BaseTimeSeries(TimeSeries defaultSeries, int seriesBeginIndex, int seriesEndIndex)
removed. UseTimeSeries.getSubseries(int i, int i)
instead - FisherIndicator: commented constructor removed.
- ✅ TestUtils: removed convenience methods for permuted parameters, fixed all unit tests
- BaseTimeSeries: Constructor
BaseTimeSeries(TimeSeries defaultSeries, int seriesBeginIndex, int seriesEndIndex)
removed. UseTimeSeries.getSubseries(int i, int i)
instead - BigDecimalNum: removed. Replaced by
PrecisionNum
- ✅ AbstractCriterionTest: removed constructor
AbstractCriterionTest(Function<Number, Num)
. UseAbstractCriterionTest(CriterionFactory, Function<Number, Num>)
. - Indicator: removed redundant
private TimeSeries