Download MetaTrader 5

what problem with this indicator

To add comments, please log in or register
forex007
16
forex007  

hi,,

what problem with this indicator

i try use this

 bool up = iCustom(0,0,"OSCILLATOR",0,1)< 5000;
  bool down = iCustom(0,0,"OSCILLATOR",1,1)< 5000;
   bool down2 = iCustom(0,0,"OSCILLATOR",2,1) < 5000;


i want if bar green ==> buy

if red sell

but in this line

 bool up = iCustom(0,0,"OSCILLATOR",0,1)< 5000;

all the time show true ...!!! 

but this line work good

  bool down = iCustom(0,0,"OSCILLATOR",1,1)< 5000;

some time show true and false

how fix this problem ? 

sorry my English not good :(

Files:
forex007
16
forex007  
any update ?
whroeder1
15060
whroeder1  
  1. We humans can't read an ex4, only a mt4 and there are no mindreaders here.
  2. The first paremeter to iCustom is a string. "0" is not a string. If you want the current chart, use NULL.
  3. The second from the last is the buffer index. We can't know if buffer index 1 is correct.
  4. We can't know what values the indicator produces, so less than 5K may always be true.
  5. Detailed explanation of iCustom - MQL4 forum
forex007
16
forex007  
WHRoeder:
  1. We humans can't read an ex4, only a mt4 and there are no mindreaders here.
  2. The first paremeter to iCustom is a string. "0" is not a string. If you want the current chart, use NULL.
  3. The second from the last is the buffer index. We can't know if buffer index 1 is correct.
  4. We can't know what values the indicator produces, so less than 5K may always be true.
  5. Detailed explanation of iCustom - MQL4 forum

thank you for reply

and i found .mt4

how fix indicator :)

Files:
Carl Schreiber
6791
Carl Schreiber  

replace lines 58-60 by:

   SetIndexLabel(0, "up");
   SetIndexLabel(1, "dn");
   SetIndexLabel(2, "buff-2");

Then you see and can call the values.

To add comments, please log in or register