EMA of a buffer
IndicatorBuffers(7); SetIndexBuffer(1, MTM_Buffer); SetIndexBuffer(2, EMA_MTM_Buffer); SetIndexBuffer(3, EMA2_MTM_Buffer); SetIndexBuffer(4, ABSMTM_Buffer); SetIndexBuffer(5, EMA_ABSMTM_Buffer); SetIndexBuffer(6, EMA2_ABSMTM_Buffer); SetIndexBuffer(7, MyEMA_Buffer); SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,TSI_Buffer); SetIndexLabel(0,"TSI"); SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,MyEMA_Buffer); SetIndexLabel(0,"MyEMA");Reread the manual. How many indicator buffers do you have and what did you tell mq4? Which array corresponds to buffer #0?
I'm trying to get the exp moving average of the TSI buffer in this code and then draw the EMA on the indicator.
However, it does not draw the value correctly as the red and yellow lines are very far apart, they should be crossing over each other.
Any ideas where I have gone wrong?