Page 1 of 1

Trying to use iCustom with this indicator & need help

Posted: Tue Feb 28, 2017 6:13 pm
by Cladi39
im trying to use iCustom with this indicator and dont work, can someone help me please?, thanks in advance.

Code: Select all

double Arrow(int i)
{
 double up = iCustom(Symbol(),0,"1 arrows & curves",0,i+1)!=EMPTY_VALUE;
 double dn = iCustom(Symbol(),0,"1 arrows & curves",1,i+1)!=EMPTY_VALUE; 
 
 if(up)
 {
 return(1);
 }
 if(dn)
 {
 return(-1);
 }
 
 return(0);
}

Re: Trying to use iCustom with this indicator & need help

Posted: Tue Feb 28, 2017 7:24 pm
by mladen
Cladi39 wrote:im trying to use iCustom with this indicator and dont work, can someone help me please?, thanks in advance.

Code: Select all

double Arrow(int i)
{
 double up = iCustom(Symbol(),0,"1 arrows & curves",0,i+1)!=EMPTY_VALUE;
 double dn = iCustom(Symbol(),0,"1 arrows & curves",1,i+1)!=EMPTY_VALUE; 
 
 if(up)
 {
 return(1);
 }
 if(dn)
 {
 return(-1);
 }
 
 return(0);
}
That indicator with those conditions will always set both conditions to true, since that indicator uses 0 instead of using EMPTY_VALUE. Compare the buffers values to 0

Re: Trying to use iCustom with this indicator & need help

Posted: Wed Mar 01, 2017 2:10 pm
by Cladi39
thanks soo much for your reply mladen is like this?

Code: Select all

double Arrow(int i)
{
 double up = iCustom(Symbol(),0,"1 arrows & curves",0,i+1);
 double dn = iCustom(Symbol(),0,"1 arrows & curves",1,i+1); 
 
 if(up>0.0000001&&up<9999999)
 {
 return(1);
 }
 if(dn>0.0000001&&dn<9999999)
 {
 return(-1);
 }
 
 return(0);
}

Re: Trying to use iCustom with this indicator & need help

Posted: Wed Mar 01, 2017 8:25 pm
by mladen
Cladi39 wrote:thanks soo much for your reply mladen is like this?

double Arrow(int i)
{
double up = iCustom(Symbol(),0,"1 arrows & curves",0,i+1);
double dn = iCustom(Symbol(),0,"1 arrows & curves",1,i+1);

if(up>0.0000001&&up<9999999)
{
return(1);
}
if(dn>0.0000001&&dn<9999999)
{
return(-1);
}

return(0);
}
No. Like this :

Code: Select all

double Arrow(int i)
{
double up = iCustom(Symbol(),0,"1 arrows & curves",0,i+1);
double dn = iCustom(Symbol(),0,"1 arrows & curves",1,i+1);
if(up!=0)
{
return(1);
}
if(dn!=0)
{
return(-1);
}
return(0);
}

Re: Trying to use iCustom with this indicator & need help

Posted: Tue Mar 28, 2017 4:22 pm
by michaelB
mladen, mrtools--
regarding the indicator CCI study 3_6 fl.
if the property "arrowsOnObOs" is set to true there are red and green signals on the chart.

I've looked at the buffers, but cannot determine which buffer/s is responsible for these signals.
Maybe the signals are drawn as Objects.
Obviously I don't have the MQ4 source file.

Can you point me in the right direction.
As always, thank you for all your help.