Thread: How to code?
View Single Post
  #16 (permalink)  
Old 02-03-2006, 01:51 PM
cucurucu's Avatar
cucurucu cucurucu is offline
Senior Member
 
Join Date: Jan 2006
Posts: 315
cucurucu is on a distinguished road
Question Zero Loss Code?

Hi,
Please help a newbie here!

Can anyone write the code (MQL4) to modify the StopLoss of an Order after the profit has reached X pips? I want to include this code into an EA. I would like to raise the StopLoss to the level of 0 profit in order to not lose anything if the market goes against my position. This way the position will close at 0 P/L. This is very useful when your position is making only few pips (not enough to trigger the trailing stop) and after that, the prices go to the oposite direction, making you lose.



Thank you.
Reply With Quote