Page 1 of 1

iCustom

Posted: Tue Jul 04, 2017 9:42 am
by Cladi39
Dear mladen, im useing indicators with iCustom function but i need to use it when candle is bullish or bearish respectibely, How to add that condition to the indicator.
RSX green with bullish
RSX red with bearish

I know is basic question for you but im learning. Thanks soo much.

Code: Select all

double RSX(int i)
{
  double up = iCustom(Symbol(),0,"3c_JRSX_H",8,5000,0,i)!=0;
  double dn = iCustom(Symbol(),0,"3c_JRSX_H",8,5000,1,i)!=0; 
   
  if(up)
  {
  return(1);
  }
  if(dn)
  {
  return(-1);
  }
 
 return(0);
}

bool Arrowup(int i)
{
          bool up=false;
       
          up = RSX(i)==1;
         
          if(up)
          {
          return true;
          }
          return false;
          
          
          
}
bool Arrowdn(int i)
{
          bool dn=false;
          
          dn = RSX(i)==-1;
 
          if(dn)
          {
          return true;
          }
          return false;
}

Re: iCustom

Posted: Tue Jul 04, 2017 3:55 pm
by mladen
Cladi39 wrote: Tue Jul 04, 2017 9:42 am Dear mladen, im useing indicators with iCustom function but i need to use it when candle is bullish or bearish respectibely, How to add that condition to the indicator.
RSX green with bullish
RSX red with bearish

I know is basic question for you but im learning. Thanks soo much.

Code: Select all

double RSX(int i)
{
  double up = iCustom(Symbol(),0,"3c_JRSX_H",8,5000,0,i)!=0;
  double dn = iCustom(Symbol(),0,"3c_JRSX_H",8,5000,1,i)!=0; 
   
  if(up)
  {
  return(1);
  }
  if(dn)
  {
  return(-1);
  }
 
 return(0);
}

bool Arrowup(int i)
{
          bool up=false;
       
          up = RSX(i)==1;
         
          if(up)
          {
          return true;
          }
          return false;
          
          
          
}
bool Arrowdn(int i)
{
          bool dn=false;
          
          dn = RSX(i)==-1;
 
          if(dn)
          {
          return true;
          }
          return false;
}
For that it is better than you use some of the new rsx's - they have one buffer dedicated to that and with a call to just one buffer you can find out all that you need to know

Re: iCustom

Posted: Wed Jul 05, 2017 7:48 am
by Cladi39
mladen wrote: Tue Jul 04, 2017 3:55 pm For that it is better than you use some of the new rsx's - they have one buffer dedicated to that and with a call to just one buffer you can find out all that you need to know
Thanks soo much mladen for help me. Where can i find that RSX?

Re: iCustom

Posted: Wed Jul 05, 2017 9:21 am
by mrtools
Cladi39 wrote: Wed Jul 05, 2017 7:48 am Thanks soo much mladen for help me. Where can i find that RSX?
Cladi39, if i'm remembering right the 3 color jrsx histogram is a regular rsx with the histogram based on rsx slope, this rsx the coloring is based on the rsx slope also and like Mladen said you can call it using the trend buffer in the rsx for the slope.

Re: iCustom

Posted: Wed Jul 05, 2017 10:48 am
by Cladi39
mrtools wrote: Wed Jul 05, 2017 9:21 am Cladi39, if i'm remembering right the 3 color jrsx histogram is a regular rsx with the histogram based on rsx slope, this rsx the coloring is based on the rsx slope also and like Mladen said you can call it using the trend buffer in the rsx for the slope.
Thanks soo much Mr.tools, for my strategy i need just an indicator with 2 buffers that show me when candle is bearish or bullish for use it with iCustom, thats all, can you do that for me please, will be very gratefull.

Re: iCustom

Posted: Wed Jul 05, 2017 12:48 pm
by mrtools
Cladi39 wrote: Wed Jul 05, 2017 10:48 am Thanks soo much Mr.tools, for my strategy i need just an indicator with 2 buffers that show me when candle is bearish or bullish for use it with iCustom, thats all, can you do that for me please, will be very gratefull.
How would you define bearish or bullish conditions for your indicator, sometimes you can build that into an EA.?

Re: iCustom

Posted: Wed Jul 05, 2017 12:52 pm
by Cladi39
mrtools wrote: Wed Jul 05, 2017 12:48 pm How would you define bearish or bullish conditions for your indicator, sometimes you can build that into an EA.?
bar is bullish when price is > open
and bearish when price is < open
Something like indicator attached, but i need buffers when candle is green (up) and red ( down) for call it with iCustom. thanks soo much