@Test public void runWithOpenEntrySellLeft() { Strategy aStrategy = new BaseStrategy(new FixedRule(1), new FixedRule(3)); List<Trade> trades = manager.run(aStrategy, OrderType.SELL, 0, 3).getTrades(); assertEquals(1, trades.size()); assertEquals(Order.sellAt(1, seriesForRun.getTick(1).getClosePrice(), Decimal.NaN), trades.get(0).getEntry()); assertEquals(Order.buyAt(3, seriesForRun.getTick(3).getClosePrice(), Decimal.NaN), trades.get(0).getExit()); }
public TradingRecord run(Strategy strategy) { return run(strategy, OrderType.BUY); }
TimeSeriesManager { public TradingRecord run(Strategy strategy) { return run(strategy, OrderType.BUY); } }
TimeSeriesManager { public TradingRecord run(Strategy strategy) { return run(strategy, OrderType.BUY); } TimeSeriesManager();  TimeSeriesManager(TimeSeries timeSeries); }
TimeSeriesManager { public TradingRecord run(Strategy strategy) { return run(strategy, OrderType.BUY); } TimeSeriesManager();  TimeSeriesManager(TimeSeries timeSeries); void setTimeSeries(TimeSeries timeSeries); TimeSeries getTimeSeries(); TradingRecord run(Strategy strategy); TradingRecord run(Strategy strategy, int startIndex, int finishIndex); TradingRecord run(Strategy strategy, OrderType orderType); TradingRecord run(Strategy strategy, OrderType orderType, int startIndex, int finishIndex); TradingRecord run(Strategy strategy, OrderType orderType, Decimal amount); TradingRecord run(Strategy strategy, OrderType orderType, Decimal amount, int startIndex, int finishIndex); }
TimeSeriesManager { public TradingRecord run(Strategy strategy) { return run(strategy, OrderType.BUY); } TimeSeriesManager();  TimeSeriesManager(TimeSeries timeSeries); void setTimeSeries(TimeSeries timeSeries); TimeSeries getTimeSeries(); TradingRecord run(Strategy strategy); TradingRecord run(Strategy strategy, int startIndex, int finishIndex); TradingRecord run(Strategy strategy, OrderType orderType); TradingRecord run(Strategy strategy, OrderType orderType, int startIndex, int finishIndex); TradingRecord run(Strategy strategy, OrderType orderType, Decimal amount); TradingRecord run(Strategy strategy, OrderType orderType, Decimal amount, int startIndex, int finishIndex);  }