Hello,
I'd like to integrate a custom indicator into an existing MT5 indicator (being used in MT4), it should show an arrow if a certain condition from the (custom) indicator is true.
I set up :
#property indicator_type DRAW_ARROW
int Custom_handle; double CustomBuffer[];
and in the OnInit() part:
SetIndexBuffer(1,CustomBuffer,INDICATOR_DATA);
PlotIndexSetInteger(1, PLOT_ARROW, 160);
ArraySetAsSeries(CustomBuffer,true);
and at the very end of the code before return(rates_total);
to "scan" all the displayed/existing bars
int s;
for (s=0; s< rates_total; s++) {if (condition[s]==true) CustomBuffer[s]=Close[0] } // Close[0] being defined and working btw
it doesn't seem to work properly.
So, if anybody has an idea how to correct it, thanks a lot in advance
From that code nobody can tell you what is exactly wrong

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I'd like to integrate a custom indicator into an existing MT5 indicator (being used in MT4), it should show an arrow if a certain condition from the (custom) indicator is true.
I set up :
#property indicator_type DRAW_ARROW
int Custom_handle; double CustomBuffer[];
and in the OnInit() part:
SetIndexBuffer(1,CustomBuffer,INDICATOR_DATA);
PlotIndexSetInteger(1, PLOT_ARROW, 160);
ArraySetAsSeries(CustomBuffer,true);
and at the very end of the code before return(rates_total);
to "scan" all the displayed/existing bars
int s;
for (s=0; s< rates_total; s++) {if (condition[s]==true) CustomBuffer[s]=Close[0] } // Close[0] being defined and working btw
it doesn't seem to work properly.
So, if anybody has an idea how to correct it, thanks a lot in advance