Momentum on Moving Average of price - page 2

 

hmm next tick came and look what happened to the chart now :( I dont think the Momentum is getting calculated for the new ticks. I think it is showing the MA now.

 
crazyfx:

Thanks a lot! I am able to see the graph now.

However, its pretty strange though. Why should we have to have both of them in the indexbuffer to the same index number whereas I am interested only in ExtMapBuffer2?

Not strange at all. How is MQL4 know it must expand buffer2 if you don't tell it. That's the SetIndexBuffer

The #property indicator_buffers tell it how many are displayed.

If you are only interested in buffer2 then use

#property indicator_buffers 1
init(){
  IndicatorBuffers(2);             // I have Two buffers
  SetIndexBuffer(0,ExtMapBuffer2); // This one is displayed
  SetIndexBuffer(1,ExtMapBuffer1); // < note the one they can't be the same

and for the future

 
Many thanks! I think now I am getting a hang of it. Thanks again to you and outofdebt.
Reason: