How to count orders which were closed by StopLoss

 

Hello,

 

I am trying to write EA which will change lot size depending on number of losses. Is there a way to count StopLoss execution in MQL4?

 

 

Regards 

 
eseq:

Hello,

 

I am trying to write EA which will change lot size depending on number of losses. Is there a way to count StopLoss execution in MQL4?

Look at the OrderClosePrice(),  compare it against the OrderStopLoss() decide if it is close enough to have been closed by the SL . . . there is no 100% method.
Reason: