@Test public void calculateWithNoTrades() { MockTimeSeries series = new MockTimeSeries(100, 105, 110, 100, 95, 105); AnalysisCriterion buyAndHold = new NumberOfTradesCriterion(); assertEquals(0d, buyAndHold.calculate(series, new BaseTradingRecord()), TATestsUtils.TA_OFFSET); }
@Override public double calculate(TimeSeries series, TradingRecord tradingRecord) { return tradingRecord.getTradeCount(); }
NumberOfTradesCriterion extends AbstractAnalysisCriterion { @Override public double calculate(TimeSeries series, TradingRecord tradingRecord) { return tradingRecord.getTradeCount(); } }
NumberOfTradesCriterion extends AbstractAnalysisCriterion { @Override public double calculate(TimeSeries series, TradingRecord tradingRecord) { return tradingRecord.getTradeCount(); }  }
NumberOfTradesCriterion extends AbstractAnalysisCriterion { @Override public double calculate(TimeSeries series, TradingRecord tradingRecord) { return tradingRecord.getTradeCount(); }  @Override double calculate(TimeSeries series, TradingRecord tradingRecord); @Override double calculate(TimeSeries series, Trade trade); @Override boolean betterThan(double criterionValue1, double criterionValue2); }
NumberOfTradesCriterion extends AbstractAnalysisCriterion { @Override public double calculate(TimeSeries series, TradingRecord tradingRecord) { return tradingRecord.getTradeCount(); }  @Override double calculate(TimeSeries series, TradingRecord tradingRecord); @Override double calculate(TimeSeries series, Trade trade); @Override boolean betterThan(double criterionValue1, double criterionValue2);  }