I did a search and found several people who have complained that the iMA function doesn't match the internal MA function. I found one who said (s)he solved it, but did not say how (s)he solved it.
I'm setting the internal MA to 5 periods, shift 0, MA method Exponential, apply to Close.
I'm using iMA(NULL,0,5,0,MODE_EMA,MODE_CLOSE,iBar)
My line averages about 0.002 below their line.
It could be because of where your EMA starts vs where the internal EMA starts, look back at the very beginning of your chart does the beginning of your EMA look anything like the beginning of the internal EMA ?
Yes it looks the same, roughly averaging 0.002 below their line.