title: Calculating Exponential Moving Average using Esper
body: <p>Looking for a way to calculate the Exponential Moving Average over a window of 5 EMA5 and EMA20 using Esper (EPL) statements.</p>
  
  <p>I have a stream of priceEvent (timeStamp , symbol and price) coming in and I wrote a Simple moving avrage SMA over a sliding window of 5 . But being fairly new to Esper , was looking for a way to calculate Exponential Moving Average (EMA) over sliding window. </p>
  
  <p><a href="http://www.iexplain.org/ema-how-to-calculate/" rel="noreferrer">http://www.iexplain.org/ema-how-to-calculate/</a></p>
  
  <p>Also it will be great help if someone can help me in writing parabolic SAR function</p>