Metatrader 5 Coding Question

 

Please,

In an alert EA, when I write :

if (GetIndicator(handle1,0,0) >GetIndicator(handle2,0,0)) , I get Alerts, and with

if ((GetIndicator(handle1,0,0) >GetIndicator(handle2,0,0)) && (GetIndicator(handle1,0,1) <GetIndicator(handle2,0,1)) ), not any Alert.

Of course , I have :

handle1 = iMA(NULL, NULL,10,0,MODE_SMA,PRICE_CLOSE);

handle2 = iMA(NULL, NULL,20,0,MODE_SMA,PRICE_CLOSE);

What is the reason ?

Thanks in advance.

Jo

Reason: