MT5 MACD signal line value

 

Good day, Im just a new coder and this is the second time writing on this matter.


There are two values when using the MACD indicator (histogram value and Signal line value)


I want to use the Signal value instead of the Histogram value.


From the previous response I was told to use  Signal Buffer(refer to the link below)

https://www.mql5.com/en/forum/321426#comment_13066522


The problem is that  the value given at SignalBuffer is not the same as the value that I want to use of Signal Line, I tested this by using the


Comment function(See attached code and images)


Please help

int handle;
double SignalBuffer[];

int Maxbars=20;

int OnInit()
{
 handle=iMACD(_Symbol,0,12,26,9,PRICE_CLOSE);

 return 0;
}

void OnTick()
{
 CopyBuffer(handle,1,0,Maxbars,SignalBuffer);

Comment("SignalBuffer_Value","(",SignalBuffer[0],")");

}
MACD signal line
MACD signal line
  • 2019.09.02
  • www.mql5.com
Good day, New coder here I have been perusing on the net for a code that uses the signal line not the histogram and I have not found any knowledge...
Files:
Img3.png  6 kb