Macd, rsi divergence with email alert - page 2

 
Igorrisimo:
"FX5_Divergence_V2.1_alerts" is an interesting indicator

But... when I write in EA a condition: "if buffer_2 > 0" (or "if buffer_3 > 0") it doesn`t work (((

What a condition must be written?

What is the format of your iCustom() call?

 

the format is:

iCustom(0, 0, "FX5_Divergence_V2.1_alerts", 12 , 26, 9, true, true, false, false, false, 2,1);

(for green arrow)

 
Igorrisimo:
the format is:

iCustom(0, 0, "FX5_Divergence_V2.1_alerts", 12 , 26, 9, true, true, false, false, false, 2,1);

(for green arrow)

Igorrisimo

Try like this :

iCustom(0, 0, "FX5_Divergence_V2.1_alerts","" , 12 , 26, 9. "", true, true, false, false, false, 2,1);
 

But I deleted this extern strings from "FX5_Divergence_V2.1_alerts" code for simplicity, (with // , of course)

You think a condition "Buffer2 > 0" is right for this indicator?

 
Igorrisimo:
But I deleted this extern strings from "FX5_Divergence_V2.1_alerts" code for simplicity, (with // , of course) You think a condition "Buffer2 > 0" is right for this indicator?

Igorrisimo

Here is an example that is using that indicator - adjust it to your version

PS: divergence arrow can be drawn at at least 2 bars away from the current bar, not at the first closed bar

 

hm... thank you very much, Mladen

I wrote a condition "buffer2 < 0 for iCustom (... 2,bar+2). And its work for green arrow!

But a condition " buffer3 > 0 for iCustom (... 3,bar+2) doesnt work for RED arrow(

(a condition " buffer3 < 0doesnt work also)

I dont understand -why...

 
Igorrisimo:
hm... thank you very much, Mladen

I wrote a condition "buffer2 < 0 for iCustom (... 2,bar+2). And its work for green arrow!

But a condition " buffer3 > 0 for iCustom (... 3,bar+2) doesnt work for RED arrow(

(a condition " buffer3 < 0doesnt work also)

I dont understand -why...

Igorrisimo

Test the following : if buffer2 != EMPTY_VALUE and buffer3 != EMPTY_VALUE.

 

Yes, it works! thank you very much, Mladen! You are the best!

 

what condition in buy/ sell?

test1[i] = iCustom(0,0,"FX5_Divergence_V2.1_alerts","" ,12,26,9,"",true,true,false,false,false,2,i); 
test2[i] = iCustom(0,0,"FX5_Divergence_V2.1_alerts","" ,12,26,9,"",true,true,false,false,false,3,i);

for buy?

if test1 < 0


for sell?

if test2 != EMPTY_VALUE and test1 != EMPTY_VALUE


thannks for helping

Reason: