// check for trailing stop if(TrailingStop>0) { if((OrderOpenPrice()-Ask)>(Point*TrailingStop)) { if((OrderStopLoss()>(Ask+Point*TrailingStop)) || (OrderStopLoss()==0)) { OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*TrailingStop,OrderTakeProfit(),0,Red); return(0); } } }
from MACD Sample
it is very simple to change this .......
in a way it is doing what you like to see.
Do an attempt making it inside of this code...
Thank you for your reply deVries!
I am sorry for the grammar mistakes before, I've fixed my post.
Redael777:
Thank you for your reply deVries!
I am sorry for the grammar mistakes before, I've fixed my post.
Do we see your attempt also ??
Mt4 has trailing stop inbuilt or is it that you want to fully automate the process.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,I need a trailing stop function that moves the sl by a certain increment:
Sell Example:
When 10 pips down from entry price, move sl to openprice,then lock in 10 pips after price moved down 20,then lock in 20 when price moved down 30,etc..
If you have such a function or if you can point me to a page that deals with it, it would be much appreciated.Thank you.