Download MetaTrader 5

how to have the color of last dot of <magic dot indicator>???

To add comments, please log in or register
mohammadsk313
38
mohammadsk313  

Hi to all

My main problem is ==> i don't have the color of last dot in magic dot indicator with (iCustom function)!!

double s = iCustom(Symbol(),0, "Magic dots 2 mtf alerts", 0 ,MODE_EMA ,6 , 0 , PRICE_CLOSE , false,false,true,false,false,false);

I Commented (s) and the out puts doesn't mach with color!!! 

please answer !!

Carl Schreiber
7293
Carl Schreiber  

It seems that the last two parameters of iCustom were not entered as they are the buffer-number and the shift - they can't be boolean!

Read about iCustom() (Mark it in the editor and press F1).

mohammadsk313
38
mohammadsk313  
Carl Schreiber:

It seems that the last two parameters of iCustom were not entered as they are the buffer-number and the shift - they can't be boolean!

Read about iCustom() (Mark it in the editor and press F1).

Tanq

you mean i must write :

double s = iCustom(Symbol(),0, "Magic dots 2 mtf alerts", 0 ,MODE_EMA ,6 , 0 , PRICE_CLOSE , false,false,true,false,false,false0,0);

Carl Schreiber
7293
Carl Schreiber  
mohammadsk313:

Tanq

you mean i must write :

double s = iCustom(Symbol(),0, "Magic dots 2 mtf alerts", 0 ,MODE_EMA ,6 , 0 , PRICE_CLOSE , false,false,true,false,false,false0,0);

1) A ',' seems to be missing: "..false0,0);"

2) As I don't know your indicator and its parameters it might work (with the ',') but it is not sure!

3) Finally I don't know whether the buffer 0 is the one you need!

mohammadsk313
38
mohammadsk313  
Carl Schreiber:

1) A ',' seems to be missing: "..false0,0);"

2) As I don't know your indicator and its parameters it might work (with the ',') but it is not sure!

3) Finally I don't know whether the buffer 0 is the one you need!

thanq

',' was a bug . it wasn't important anyway thanq(:

eevviill6
27
eevviill6  
mohammadsk313:

Hi to all

My main problem is ==> i don't have the color of last dot in magic dot indicator with (iCustom function)!!

double s = iCustom(Symbol(),0, "Magic dots 2 mtf alerts", 0 ,MODE_EMA ,6 , 0 , PRICE_CLOSE , false,false,true,false,false,false);

I Commented (s) and the out puts doesn't mach with color!!! 

please answer !!

 

double last_dot_price;

double data;

for(int i=0;i<Bars-20;i++)

{

data=iCustom(...,i);

if(data!=EMPTY_VALUE)

{

last_dot_price=data;

break;

}

}
whroeder1
15924
whroeder1  
mohammadsk313: i don't have the color of last dot in magic dot indicator with (iCustom function)!!
  1. You should write a self documenting function instead of calling iCustom directly, see Detailed explanation of iCustom - MQL4 forum
  2. Color means it uses two or more buffers. You have a color when the value is not EMPTY_VALUE.
  3. You must loop backwards until you find a buffer with a value. Then you'll know the color based on which buffer has the value.
To add comments, please log in or register