Hello,

EMA in ta-lib are NOT initialized (the starting point is first data in 
the series)
EMA in AFL are initialized the way they are in Tradestation and 
Metastock, i.e.
the very first value (initial) for N-bar EMA is the value of SIMPLE 
(arithmetic) moving average.

To workaround this problem TA-LIB has "SetUnstablePeriod" function that 
strips off given
number of bytes.
http://ta-lib.org/d_api/ta_setunstableperiod.html

More properly TA-LIB should adjust their codes to initialize with SMA.

If you want TA-lib equivalent you may use AFL's AMA with feedback factor 
2/(period+1)
AMA( array, 2 / (period+1) )

Best regards,
Tomasz Janeczko
amibroker.com

On 2010-04-26 20:44, droskill wrote:
> do you have the same starting point for the data?  That, I believe, will 
> highly influence your results.
>
> --- In [email protected], "Prabu"<prabui...@...>  wrote:
>    
>>
>> How is ema calculated in AmiBroker?
>> Why the result is different from ta-lib's ema result?
>>
>>      
>
>
>
> ------------------------------------
>
> **** IMPORTANT PLEASE READ ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.
>
> TO GET TECHNICAL SUPPORT send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> http://www.amibroker.com/feedback/
> (submissions sent via other channels won't be considered)
>
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> Yahoo! Groups Links
>
>
>
>
>    

Reply via email to