iCustom

1
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

5
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
Thank you very much master, work perfect.

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);
}


Who is online

Users browsing this forum: ChuChu Rocket and 12 guests