EPAdministrator cepAdm = cep.getEPAdministrator();
EPStatement cepStatement = cepAdm.createEPL("select symbol,price,avg(price) from " + "StockTick(symbol='AAPL').win:length(10) "
+ "having avg(price) > 60.0");
cepStatement.addListener(new CEPListener());
// We generate a few ticks...
for (int i = 0; i < 6000; i++) {
generateRandomTick(cepRT);
ThreadUtil.sleep(500);