The TMA slope code I used was taken from one of the MT4 indicator from NB's system. A while backnow I'll have to try and find the exact one. When plotted and using a short TimeFrame I think it looks correct as far as I can tell.

JCL informs me that TMA is a double SMA.

function TMA(var *data,int period)
{
return SMA(series(SMA(data,period),period));
}

I stuck with what I had as it seemed to work but JCL is probably correct.