Help, iCustom problem.

To add comments, please log in or register
Jox90
1225
Jox90  

Hello. I would like to use iCustom function to call arrows of this indicator (https://www.mql5.com/en/code/7821). I coded as:

double buy=iCustom(NULL,0,"lukas1_Arrows_Curves",0,0);
double sell=iCustom(NULL,0,"lukas1_Arrows_Curves",1,0);

//...and in the if statements:

if(OpenSELL && sell>0)

if(OpenBUY && buy>0)

But it doesn't work properly, I mean, it doesn't open an order only on the single arrow, but opens multiple orders...

I also tried with EMPTY_VALUE to "catch" the single arrow:

if(OpenSELL && sell!=EMPTY_VALUE)

if(OpenBUY && buy!=EMPTY_VALUE)

But it doesn't work at all.

Could please someone expert suggest me what to correct in the iCustom function or in the if statement to call properly the single arrow (buy and sell) in order to open an order only when the single arrow appears?

PS. (the code above is only a part of the whole code which works for sure, so the problem is not of the main code, but of the iCustom and "if statement").


Thank you...
Arrows & Curves
Arrows & Curves
  • www.mql5.com
Arrows & Curves indicator.
Marco vd Heijden
Moderator
12421
Marco vd Heijden  
This code does not open any orders.
Jox90
1225
Jox90  
Marco vd Heijden:
This code does not open any orders.
It's part of the code...and yes, the second with EMPTY_VALUE doesn't open anything, that's what I said...instead the first opens multiple orders, I suppose because it considers the function always >0.
Jox90
1225
Jox90  
I solved, the functions were right, the problem was the indicator which did not update.
To add comments, please log in or register