EMA Problem

 
I'm having a problem where the visual representation of my EMA lines seem to be different then the calculated representation. Here's what I have:

- 3 EMA lines for different periods
- A custom indicator that goes to 1 when the fast EMA is greater than the mid EMA and the mid EMA is greater than the slow EMA. The indicator goes to -1 on the reverse, and 0, .5 and -.5 for other conditions. However, I'm most concerned about the 1, 0, and -1 conditions.
- If I draw 3 EMA indicator lines on my chart, and compare those to my signal, I'm not getting identical values. The custom indicator is one to two bars, sometimes 3 bars, later than the EMA indicators on the screen.

Following is a screenshot:


I've tried to use normalizeddouble, but it didn't seem to impact it. I've also used various prices - high, low, close, median, etc. However, I would expect that as long as my custom indicator values are the same as the EMA indicator values, then the results should be the same.

Is this a known issue?

Thanks.

Taylor
Reason: