[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] EMA returning {INF}



PureBytes Links

Trading Reference Links

Hi

I want to calculate the EMA of the spread between two foreign tickers but find the EMA function returns {INF} (infinite).  

 

The code below calculates the spread OK but when included into EMA function it returns {INF} (infinite).  

 

The two foreign Tickers are back adjusted futures contracts with some of the early data negative and also they  have different data lengths, if that makes any difference?

 

I assume the spread array supplied to the EMA function is incompatible?

 

Any help would be appreciated.

Thanks

Peter

 

SetForeign(tickerA);

fcA = C;

RestorePriceArrays();

 

SetForeign(tickerB);

fcB = C;

RestorePriceArrays();

 

Spread = fcA/fcB;

 

EMASpread = EMA(Spread  ,10 );

 



Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





YAHOO! GROUPS LINKS