Dear mladen, i try to call this indicator with iCustom but dont work, Can you help me please and tell me what is wrong. Thanks in advance.
double SA(int i)
{
double up = iCustom(NULL,0,"SA",1,i)!=EMPTY_VALUE;
double dn = iCustom(NULL,0,"SA",0,i)!=EMPTY_VALUE;
if(up)
{
return(1);
}
if(dn)
{
return(-1);
}
return(0);
}
bool Arrowup(int i)
{
bool up=false;
up = SA(i)==1;
if(up)
{
return true;
}
return false;
}
bool Arrowdn(int i)
{
bool dn=false;
dn = SA(i)==-1;
if(dn)
{
return true;
}
return false;
}
Re: iCustom
2The following 2 variables should be bool not double.
double up = iCustom(NULL,0,"SA",1,i)!=EMPTY_VALUE;
double dn = iCustom(NULL,0,"SA",0,i)!=EMPTY_VALUE;
double up = iCustom(NULL,0,"SA",1,i)!=EMPTY_VALUE;
double dn = iCustom(NULL,0,"SA",0,i)!=EMPTY_VALUE;
Re: iCustom
3Thanks for your answer but dont work.MrPip wrote: Fri May 26, 2017 8:08 am The following 2 variables should be bool not double.
double up = iCustom(NULL,0,"SA",1,i)!=EMPTY_VALUE;
double dn = iCustom(NULL,0,"SA",0,i)!=EMPTY_VALUE;
Re: iCustom
4SA indicator never stores EMPTY_VALUE to those buffers. Instead it stores EMPTY (which is different from EMPTY_VALUE)
Check for EMPTY
Re: iCustom
5Thank you very much master, work perfect.mladen wrote: Sat May 27, 2017 12:23 am SA indicator never stores EMPTY_VALUE to those buffers. Instead it stores EMPTY (which is different from EMPTY_VALUE)
Check for EMPTY
double SA(int i)
{
double up = iCustom(NULL,0,"SA",1,i)!=EMPTY;
double dn = iCustom(NULL,0,"SA",0,i)!=EMPTY;
if(up)
{
return(1);
}
if(dn)
{
return(-1);
}
return(0);
}