use of com.github.jnidzwetzki.cryptobot.strategy.DonchianChannelStrategy in project crypto-bot by jnidzwetzki.
the class Main method run.
@Override
public void run() {
try {
System.out.println("Load data from file");
loadDataFromFile();
System.out.println("Executing trading on ticks: " + timeSeries.getEndIndex());
printHeader();
// final TradeStrategyFactory factory = new EMAStrategy03(5, 12, 40);
// final Strategy strategy = ForexStrategy01.getStrategy(timeSeries);
final TradeStrategyFactory factory1 = new DonchianChannelStrategy(24 * 4, 12 * 4, timeSeries);
processTrade(factory1);
final TradeStrategyFactory factory2 = new DonchianChannelStrategy(24 * 4, 24 * 4, timeSeries);
processTrade(factory2);
final TradeStrategyFactory factory3 = new DonchianChannelStrategy(12 * 4, 24 * 4, timeSeries);
processTrade(factory3);
// findEma();
} catch (Exception e) {
e.printStackTrace();
}
}
Aggregations