ta4j v0.12 Release Notes

Release Date: 2018-09-10 // over 5 years ago
  • 💥 Breaking:

    • Decimal class has been replaced by new Num interface. Enables using Double, BigDecimal and custom data types for calculations.
    • Big changes in TimeSeries and BaseTimeSeries. Multiple new addBar(..) functions in TimeSeries 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 by Num.
    • ALL CRITERION: Calculations modified to use Num.
    • AbstractIndicator: new AbstractIndicator#numOf(Number n) function as counterpart of dropped Decimal.valueOf(double|int|..)
    • TimeSeries | Bar: preferred way to add bar data to a TimeSeries is directly to the series via new TimeSeries#addBar(time,open,high,..) functions. It ensures to use the correct Num 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) to Num.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 on double primitive
    • BigDecimalNum: Default Num implementation of BaseTimeSeries
    • 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 and BigDecimalNum
    • 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. Use TimeSeries.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. Use TimeSeries.getSubseries(int i, int i) instead
    • BigDecimalNum: removed. Replaced by PrecisionNum
    • AbstractCriterionTest: removed constructor AbstractCriterionTest(Function<Number, Num). Use AbstractCriterionTest(CriterionFactory, Function<Number, Num>).
    • Indicator: removed redundant private TimeSeries