@Test public void calculateWithNoTrades() { MockBarSeries series = new MockBarSeries(numFunction, 100, 105, 110, 100, 95, 105); AnalysisCriterion buyAndHold = getCriterion(); assertNumEquals(0, buyAndHold.calculate(series, new BaseTradingRecord())); }
@Override public Num calculate(BarSeries series, TradingRecord tradingRecord) { return series.numOf(tradingRecord.getTradeCount()); }
NumberOfTradesCriterion extends AbstractAnalysisCriterion { @Override public Num calculate(BarSeries series, TradingRecord tradingRecord) { return series.numOf(tradingRecord.getTradeCount()); } }
NumberOfTradesCriterion extends AbstractAnalysisCriterion { @Override public Num calculate(BarSeries series, TradingRecord tradingRecord) { return series.numOf(tradingRecord.getTradeCount()); }  }
NumberOfTradesCriterion extends AbstractAnalysisCriterion { @Override public Num calculate(BarSeries series, TradingRecord tradingRecord) { return series.numOf(tradingRecord.getTradeCount()); }  @Override Num calculate(BarSeries series, TradingRecord tradingRecord); @Override Num calculate(BarSeries series, Trade trade); @Override boolean betterThan(Num criterionValue1, Num criterionValue2); }
NumberOfTradesCriterion extends AbstractAnalysisCriterion { @Override public Num calculate(BarSeries series, TradingRecord tradingRecord) { return series.numOf(tradingRecord.getTradeCount()); }  @Override Num calculate(BarSeries series, TradingRecord tradingRecord); @Override Num calculate(BarSeries series, Trade trade); @Override boolean betterThan(Num criterionValue1, Num criterionValue2);  }