Looking for a way to calculate the Exponential Moving Average over a window of 5 EMA5 and EMA20 using Esper (EPL) statements.
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.
http://www.iexplain.org/ema-how-to-calculate/
Also it will be great help if someone can help me in writing parabolic SAR function