@Test public void test() { RSI2Strategy.main(null); }
public static void main(String[] args) { BarSeries series = CsvTradesLoader.loadBitstampSeries(); Strategy strategy = buildStrategy(series); BarSeriesManager seriesManager = new BarSeriesManager(series); TradingRecord tradingRecord = seriesManager.run(strategy); System.out.println("Number of trades for the strategy: " + tradingRecord.getTradeCount()); System.out.println( "Total profit for the strategy: " + new TotalProfitCriterion().calculate(series, tradingRecord)); }
RSI2Strategy { public static void main(String[] args) { BarSeries series = CsvTradesLoader.loadBitstampSeries(); Strategy strategy = buildStrategy(series); BarSeriesManager seriesManager = new BarSeriesManager(series); TradingRecord tradingRecord = seriesManager.run(strategy); System.out.println("Number of trades for the strategy: " + tradingRecord.getTradeCount()); System.out.println( "Total profit for the strategy: " + new TotalProfitCriterion().calculate(series, tradingRecord)); } }
RSI2Strategy { public static void main(String[] args) { BarSeries series = CsvTradesLoader.loadBitstampSeries(); Strategy strategy = buildStrategy(series); BarSeriesManager seriesManager = new BarSeriesManager(series); TradingRecord tradingRecord = seriesManager.run(strategy); System.out.println("Number of trades for the strategy: " + tradingRecord.getTradeCount()); System.out.println( "Total profit for the strategy: " + new TotalProfitCriterion().calculate(series, tradingRecord)); }  }
RSI2Strategy { public static void main(String[] args) { BarSeries series = CsvTradesLoader.loadBitstampSeries(); Strategy strategy = buildStrategy(series); BarSeriesManager seriesManager = new BarSeriesManager(series); TradingRecord tradingRecord = seriesManager.run(strategy); System.out.println("Number of trades for the strategy: " + tradingRecord.getTradeCount()); System.out.println( "Total profit for the strategy: " + new TotalProfitCriterion().calculate(series, tradingRecord)); }  static Strategy buildStrategy(BarSeries series); static void main(String[] args); }
RSI2Strategy { public static void main(String[] args) { BarSeries series = CsvTradesLoader.loadBitstampSeries(); Strategy strategy = buildStrategy(series); BarSeriesManager seriesManager = new BarSeriesManager(series); TradingRecord tradingRecord = seriesManager.run(strategy); System.out.println("Number of trades for the strategy: " + tradingRecord.getTradeCount()); System.out.println( "Total profit for the strategy: " + new TotalProfitCriterion().calculate(series, tradingRecord)); }  static Strategy buildStrategy(BarSeries series); static void main(String[] args);  }