Ta4j Wiki

Documentation, examples and further information of the ta4j project

View the Wiki On GitHub

This project is maintained by ta4j Organization

Usage Examples

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=….

Start quickly

Bar series & Num

Indicators & visualization

Charting with ChartWorkflow

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:

Strategy patterns

Backtesting & analytics

Bots & live trading

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.