Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hi All,,
I have a strange situation as follow:
MA1_DN=NormalizeDouble(MA1-ATR1,4);
..................
if (OrderStopLoss()!=MA1_DN)
{
Print("MA1_DN=",MA1_DN," OrderStopLoss=",OrderStopLoss());
OrderModify(OrderTicket(),OrderOpenPrice(),MA1_DN,0,0,Red);
}
It returns :
15:25:40 2005.03.31 01:00 test3 EURUSD,M5: MA1_DN=1.2932 OrderStopLoss=1.2932
15:25:40 2005.03.31 01:00 test3 EURUSD,M5: OrderModify error 1
15:25:40 2005.03.31 02:00 test3 EURUSD,M5: MA1_DN=1.2932 OrderStopLoss=1.2932
15:25:40 2005.03.31 02:00 test3 EURUSD,M5: OrderModify error 1
Actually, the MA1_DN is equal to OrderStopLoss.
But How does it pass the If(...) and print something???
Is the If(...) something wrong??