Documentation, examples and further information of the ta4j project
This project is maintained by ta4j Organization
The ta4j-examples module mirrors the structure of this wiki. Each example is a standalone main program—open it in your IDE or run mvn -pl ta4j-examples exec:java -Dexec.mainClass=….
NumNum implementation for your workload.The ChartWorkflow class provides a fluent ChartBuilder API for creating trading charts. See the Charting guide for comprehensive documentation. Quick example:
ChartWorkflow chartWorkflow = new ChartWorkflow();
chartWorkflow.builder()
.withSeries(series)
.withTradingRecordOverlay(tradingRecord)
.withIndicatorOverlay(rsi)
.withIndicatorOverlay(macd)
.withAnalysisCriterionOverlay(new MaximumDrawdownCriterion(), tradingRecord)
.display();
// Or save to a file
chartWorkflow.builder()
.withSeries(series)
.withTradingRecordOverlay(tradingRecord)
.save("target/charts", "my-strategy");
Strategy examples that use charting:
BacktestExecutor to keep a rolling leaderboard of strategies.Have a favorite workflow or integration that is not covered yet? Contributions to ta4j-examples are welcome—new examples make the wiki even more actionable.