Quick answer
ta4j is an open-source Java library for technical analysis. You build a BarSeries, compose indicators and rules into a Strategy, and run it with BarSeriesManager to get trades and performance criteria. It is the standard choice for indicator logic on the JVM.
ta4j at a glance
- Category
- C#, Java & C++ frameworks
- Language
- Java
- License
- MIT
- Does
- Indicators, Backtesting
- Markets
- Stocks, Crypto, Forex, Futures
- Best for
- JVM trading systems that need indicators and simple backtests.
- In AlgoGP
- Use the exported strategy object from your own code
Pick it if
JVM trading systems that need indicators and simple backtests.
Watch out for
No broker connectivity built in.
ta4j strengths and limitations
Strengths
- Composable rules and strategies.
- Large indicator set.
- Active maintenance.
Limitations
- No broker connectivity built in.
ta4j example
Maven: org.ta4j:ta4j-coreClosePriceIndicator close = new ClosePriceIndicator(series);
SMAIndicator fast = new SMAIndicator(close, 50), slow = new SMAIndicator(close, 200);
Strategy strategy = new BaseStrategy(new CrossedUpIndicatorRule(fast, slow), new CrossedDownIndicatorRule(fast, slow));
TradingRecord record = new BarSeriesManager(series).run(strategy);Use ta4j with AlgoGP
AlgoGP does not add ta4j to projects automatically yet, but nothing stops you using them together. Every AlgoGP project exports plain Python with a framework-neutral strategy object, so you can call it from ta4j yourself.
- 1
Design and backtest in AlgoGP
Describe the idea to the copilot and backtest it on AlgoGP’s normalized history.
- 2
Add any bridge to get the adapter core
Adding a bridged framework (for example Backtrader) writes
frameworks/algogp_bridge.py, whoseStrategyBridge.on_bar()returns the orders the strategy wants. - 3
Call it from ta4j
Feed ta4j’s bars to
StrategyBridge, place the returned orders with ta4j, and report fills back withsync().
ta4j: frequently asked questions
Does ta4j trade live?
It computes signals; connect them to a broker API yourself.
ta4j alternatives
- TA-LibC, PythonThe standard C library of 150+ technical indicators and candlestick patterns, used from Python through the TA-Lib wrapper.
- StockSharpC#C#/.NET trading platform and libraries: strategy designer, backtester and connectors to dozens of brokers, exchanges and crypto venues.
- QuantConnect LEANC#, PythonThe open-source engine behind QuantConnect: event-driven backtesting and live trading in C# or Python across equities, options, futures, FX and crypto.
- pandas-taPythonPure-Python technical analysis extension for pandas: 130+ indicators as DataFrame methods, plus strategies that add many at once.
Independent guide. AlgoGP is not affiliated with ta4j. Features, licenses and maintenance change; check the official documentation. Nothing here is investment advice.