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 );