class PriceSpikePredicate extends AbstractAdviserPredicate {

  @Override
  public boolean apply(PriceTick priceTick) {
    if (barOpenTimestamp <= 0 || priceTick.getTimestamp() > barCloseTimestamp) {
      prepareNewBar(priceTick);
      return false;
    }
    final double pipsVariation = getPricePips(
        priceTick.getClosePriceAsk() - openPriceAsk, priceMinimalDecimalPosition);
    if (pipsVariation >= minimumPips && ! eventDispatched) {
      eventDispatched = true;
      return true;
    }
    return false;
  }

  public  PriceSpikePredicate(PredicateExecutionContext predicateExecutionContext);

}