Download MetaTrader 5
To add comments, please log in or register
Publish your task in Freelance service and developers will execute your order.
forex007
16
forex007 2015.05.26 23:30 

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 2015.05.27 08:10  
any update ?
whroeder1
13592
whroeder1 2015.05.27 10:46  
  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 2015.05.27 20:52  
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
5927
Carl Schreiber 2015.05.27 21:21  

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