Create your strategy

Your strategy is in src/main/java/tech/cassandre/trading/strategy/SimpleTa4jStrategy.java

Choose the requested currency pair.

This is done by implementing getRequestedCurrencyPair() this way :

@Override
public CurrencyPairDTO getRequestedCurrencyPair() {
return new CurrencyPairDTO(BTC, USDT);
}

Choose the number of bars.

This is done by implementing getMaximumBarCount() this way :

@Override
public int getMaximumBarCount() {
return 10;
}

Choose the delay between two bars.

This is done by implementing getDelayBetweenTwoBars() this way :

@Override
public Duration getDelayBetweenTwoBars() {
return Duration.ofDays(1);
}

Create your strategy.

Now it's time to implement your own strategy, here, we chose Simple Moving Average (SMA) :

@Override
public Strategy getStrategy() {
ClosePriceIndicator closePrice = new ClosePriceIndicator(getSeries());
SMAIndicator sma = new SMAIndicator(closePrice, getMaximumBarCount());
return new BaseStrategy(new UnderIndicatorRule(sma, closePrice), new OverIndicatorRule(sma, closePrice));
}