@Test public void cashFlowValueWithNoTrades() { BarSeries sampleBarSeries = new MockBarSeries(numFunction, 3d, 2d, 5d, 4d, 7d, 6d, 7d, 8d, 5d, 6d); CashFlow cashFlow = new CashFlow(sampleBarSeries, new BaseTradingRecord()); assertNumEquals(1, cashFlow.getValue(4)); assertNumEquals(1, cashFlow.getValue(7)); assertNumEquals(1, cashFlow.getValue(9)); }
@Override public Num getValue(int index) { return values.get(index); }
CashFlow implements Indicator<Num> { @Override public Num getValue(int index) { return values.get(index); } }
CashFlow implements Indicator<Num> { @Override public Num getValue(int index) { return values.get(index); } CashFlow(BarSeries barSeries, Trade trade);  CashFlow(BarSeries barSeries, TradingRecord tradingRecord);  CashFlow(BarSeries barSeries, TradingRecord tradingRecord, int finalIndex); }
CashFlow implements Indicator<Num> { @Override public Num getValue(int index) { return values.get(index); } CashFlow(BarSeries barSeries, Trade trade);  CashFlow(BarSeries barSeries, TradingRecord tradingRecord);  CashFlow(BarSeries barSeries, TradingRecord tradingRecord, int finalIndex); @Override Num getValue(int index); @Override BarSeries getBarSeries(); @Override Num numOf(Number number); int getSize(); }
CashFlow implements Indicator<Num> { @Override public Num getValue(int index) { return values.get(index); } CashFlow(BarSeries barSeries, Trade trade);  CashFlow(BarSeries barSeries, TradingRecord tradingRecord);  CashFlow(BarSeries barSeries, TradingRecord tradingRecord, int finalIndex); @Override Num getValue(int index); @Override BarSeries getBarSeries(); @Override Num numOf(Number number); int getSize();  }