Skip to content

Commit

Permalink
implement Num sqrt(int) and Num sqrt() for: (ta4j#266)
Browse files Browse the repository at this point in the history
* added trailing stop loss rule

* added trade-awareness, fixed Trade#equals

if the TrailingStopLossRule is used in the context of other rules ( e.g.
using OrRule/AndRule ), this rule might not notice that the current
trade has changed; thus, the extremum is wrong. This commit fixes this
issue.

* added test-cases for Trade#equals

* implement Num sqrt(int) and Num sqrt() for:
BigDecimalNum, DoubleNum, NaN, PrecisionNum
Num: add Num sqrt(int) and Num sqrt()
NumTest: add sqrt(int) and sqrt() tests

* changelog

* numTest.properties: changed property names
NumTest: moved into num/ and changed property names
  • Loading branch information
edlins authored and team172011 committed May 10, 2018
1 parent 76a3b1f commit 9ac7378
Show file tree
Hide file tree
Showing 8 changed files with 710 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Changelog for `ta4j`, roughly following [keepachangelog.com](http://keepachangel
- **BollingerBandsMiddleIndicator**: added missing constructor documentation.
- **PrecisionNum**: `Num` implementation to support arbitrary precision
- **TrailingStopLossRule**: new rule that is satisfied if trailing stop loss is reached
- **Num**: added Num sqrt(int) and Num sqrt()

### Removed/Deprecated
- **Decimal**: _removed_. Replaced by `Num` interface
Expand Down
Loading

0 comments on commit 9ac7378

Please sign in to comment.