Page 1 of 1

iCustom Indicator level

Posted: Wed Feb 22, 2017 3:25 am
by Cladi39
Hello mladen, i need to add this indicator with others by iCustom function, but i dont know how to code when red bar and green bar is at 16 level. Im little new codeing need your help please.

I do something like this an dont work:

Code: Select all

double up = iCustom(NULL,0,"P-fractal_32_his_se_Alert",1,0);
 double dn = iCustom(NULL,0,"P-fractal_32_his_se_Alert",0,0); 
 
 if(up=16)
 {
 return(1);
 }
 if(dn=16)
 {
 return(-1);
 }
 
 return(0);
}

Re: iCustom Indicator level

Posted: Wed Feb 22, 2017 3:41 am
by mntiwana
Cladi39 wrote:Hello mladen, i need to add this indicator with others by iCustom function, but i dont know how to code when red bar and green bar is at 16 level. Im little new codeing need your help please.
Hi Cladi39
Man you are welcome here,thanks for joining us.
can you illustrate in picture what exactly you want or trying to form.
regards

Re: iCustom Indicator level

Posted: Wed Feb 22, 2017 3:57 am
by mladen
Cladi39 wrote:Hello mladen, i need to add this indicator with others by iCustom function, but i dont know how to code when red bar and green bar is at 16 level. Im little new codeing need your help please.

I do something like this an dont work:

Code: Select all

double up = iCustom(NULL,0,"P-fractal_32_his_se_Alert",1,0);
 double dn = iCustom(NULL,0,"P-fractal_32_his_se_Alert",0,0); 
 
 if(up=16)
 {
 return(1);
 }
 if(dn=16)
 {
 return(-1);
 }
 
 return(0);
}
Cladi39

There are two things that you have to pay attention too :
fractal will never happen on a current bar (the last "0") in your iCustom() callthe value will not be some strict value
In any case that indicator itself must be rewritten to be usable, otherwise it will repaint - and I don't mean repaint like fractal but like classical repainters - there are coding errors in it

Re: iCustom Indicator level

Posted: Wed Feb 22, 2017 4:39 pm
by Cladi39
Thank soo much mladen and Mntiwana.