@Test public void isSatisfied() { assertTrue(rule.isSatisfied(0)); assertTrue(rule.isSatisfied(1)); assertTrue(rule.isSatisfied(2)); assertFalse(rule.isSatisfied(3)); assertFalse(rule.isSatisfied(4)); assertFalse(rule.isSatisfied(5)); assertFalse(rule.isSatisfied(6)); assertTrue(rule.isSatisfied(7)); }
@Override public boolean isSatisfied(int index, TradingRecord tradingRecord) { final boolean satisfied = first.getValue(index).isGreaterThan(second.getValue(index)); traceIsSatisfied(index, satisfied); return satisfied; }
OverIndicatorRule extends AbstractRule { @Override public boolean isSatisfied(int index, TradingRecord tradingRecord) { final boolean satisfied = first.getValue(index).isGreaterThan(second.getValue(index)); traceIsSatisfied(index, satisfied); return satisfied; } }
OverIndicatorRule extends AbstractRule { @Override public boolean isSatisfied(int index, TradingRecord tradingRecord) { final boolean satisfied = first.getValue(index).isGreaterThan(second.getValue(index)); traceIsSatisfied(index, satisfied); return satisfied; } OverIndicatorRule(Indicator<Num> indicator, Number threshold);  OverIndicatorRule(Indicator<Num> indicator, Num threshold);  OverIndicatorRule(Indicator<Num> first, Indicator<Num> second); }
OverIndicatorRule extends AbstractRule { @Override public boolean isSatisfied(int index, TradingRecord tradingRecord) { final boolean satisfied = first.getValue(index).isGreaterThan(second.getValue(index)); traceIsSatisfied(index, satisfied); return satisfied; } OverIndicatorRule(Indicator<Num> indicator, Number threshold);  OverIndicatorRule(Indicator<Num> indicator, Num threshold);  OverIndicatorRule(Indicator<Num> first, Indicator<Num> second); @Override boolean isSatisfied(int index, TradingRecord tradingRecord); }
OverIndicatorRule extends AbstractRule { @Override public boolean isSatisfied(int index, TradingRecord tradingRecord) { final boolean satisfied = first.getValue(index).isGreaterThan(second.getValue(index)); traceIsSatisfied(index, satisfied); return satisfied; } OverIndicatorRule(Indicator<Num> indicator, Number threshold);  OverIndicatorRule(Indicator<Num> indicator, Num threshold);  OverIndicatorRule(Indicator<Num> first, Indicator<Num> second); @Override boolean isSatisfied(int index, TradingRecord tradingRecord);  }