Is any MQL function, so i can know my trade hit SL or not.

 

Is there any MQL function so i can know my trade hit SL or not. below image MT4 do red color that trade hit SL. so you know Mt4 know those trade hit SL. so is there any code so i can know trade close by SL or not.



 
StringFind(...

[sl]

in

OrderComment(....
 
Marco vd Heijden:

[sl]

in

Not reliable.
 
Alain Verleyen:
Not reliable.

Why maybe you have a better solution ?

I use a lot of none reliable stuff, in fact i do not trust anything at all...

but if it does the job, without catastrophic failure, i'm still very happy with it 

 
Marco vd Heijden:

Why maybe you have a better solution ?

I use a lot of none reliable stuff, in fact i do not trust anything at all...

but if it does the job, without catastrophic failure, i'm still very happy with it 

Until a catastrophic failure will happen. The comments can be changed by the broker. And you probably know the Murphy law...

You need to check the close price and stoploss price to identify if SL was hit.

Reason: