8000 GitHub - ta4j/ta4j: A Java library for technical analysis.
[go: up one dir, main page]

Skip to content

ta4j/ta4j

Repository files navigation

ta4j Build and Test Discord License: MIT Maven Central Sonatype Nexus (Snapshots)

Technical Analysis For Java

Ta4j main chart

Ta4j is an open source Java library for technical analysis. It provides the basic components for creation, evaluation and execution of trading strategies.


Features

  • 100% Pure Java - works on any Java Platform version 11 or later
  • More than 130 technical indicators (Aroon, ATR, moving averages, parabolic SAR, RSI, etc.)
  • A powerful engine for building custom trading strategies
  • Utilities to run and compare strategies
  • Minimal 3rd party dependencies
  • Simple integration
  • One more thing: it's MIT licensed

Serialization utilities

The core module ships with component serializers that convert indicators and strategies into JSON payloads backed by ComponentDescriptor. Indicators can call Indicator#toJson() / Indicator#fromJson(BarSeries, String) to persist their configuration, while strategies can now rely on Strategy#toJson() / Strategy#fromJson(BarSeries, String) for round-tripping entry and exit rules alongside metadata. These helpers make it easier to store and exchange model parameters without hand-rolling JSON glue.

Maven configuration

Ta4j is available on Maven Central. You just have to add the following dependency in your pom.xml file.

<dependency>
  <groupId>org.ta4j</groupId>
  <artifactId>ta4j-core</artifactId>
  <version>0.19</version>
</dependency>

For snapshots, add the following repository to your pom.xml file.

<repository>
    <id>sonatype snapshots</id>
    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>

The current snapshot version is 0.20-SNAPSHOT from the develop branch.

<dependency>
  <groupId>org.ta4j</groupId>
  <artifactId>ta4j-core</artifactId>
  <version>0.20-SNAPSHOT</version>
</dependency>

You can also download example code from the maven central repository by adding the following dependency to your pom.xml:

<dependency>
  <groupId>org.ta4j</groupId>
  <artifactId>ta4j-examples</artifactId>
  <version>0.19</version>
</dependency>

or for the bleeding edge:

<dependency>
  <groupId>org.ta4j</groupId>
  <artifactId>ta4j-examples</artifactId>
  <version>0.20-SNAPSHOT</version>
</dependency>

Getting Help

The wiki is the best place to start learning about ta4j. For more detailed questions, please use the issues tracker.

Contributing to ta4j

Here are some ways for you to contribute to ta4j:

See also: the contribution policy and Code of Conduct

   

Release & Snapshot Publishing

Ta4j uses automated workflows for publishing both snapshot and stable releases.

Snapshots

Every push to master triggers a snapshot deployment:

mvn deploy

Snapshots are available at:

https://central.sonatype.com/repository/maven-snapshots/

Stable Releases

Releases are performed in two phases:

1. Prepare the release notes

scripts/prepare-release.sh <version>

This script:

  • Moves the Unreleased changelog section into a new versioned section
  • Resets Unreleased
  • Updates R 9217 EADME version references
  • Generates release/<version>.md

2. Trigger the GitHub release workflow

From GitHub:

Actions → Publish Release to Maven Central → Run workflow

Provide:

  • releaseVersion (e.g. 0.20)
  • nextVersion (e.g. 0.21-SNAPSHOT)

The workflow automatically:

  • Updates project version
  • Creates a tag
  • Deploys artifacts to Maven Central
  • Bumps next snapshot
  • Pushes changes
  • Creates a GitHub Release with the generated notes

   

Powered by

JetBrains logo.

       

0