Download MetaTrader 5
To add comments, please log in or register
All MQL5.community events are grouped together. Have a look at the Wall!
eseq
93
eseq 2014.11.04 04:14 

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 

Simon Gniadkowski
Moderator
17963
Simon Gniadkowski 2014.11.04 09:08  
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.
/
To add comments, please log in or register