Problem with programming a trailing stop using profit as reference in stead of moving the stop loss up?

 

Hi, I am brand new to the programming of Expert Advisers, and I need some help with my trailing stops. I can write a simple step up tailing stop, but my strategy requires me to be able to be stopped out x amount of points from the highest point of profit and not move my stop by x once the market has moved so much in my favour. Is this possible, and if so would anybody be able to help me with an example?

Any help would be greatly appreciated, Thanks.

Thys

 

Welcome to the MQL4 forum.

Try here

Also you can search in this box in the upper right for "trailing stop".

That should get you started.

 
How do you know its the highest point of profit?
 
710528:

.......my strategy requires me to be able to be stopped out x amount of points from the highest point....


If you reach the highest point of profit start your Trailingstoploss with x points from the price that moment....
 
bdeyes:


Welcome to the MQL4 forum.

Try here

Also you can search in this box in the upper right for "trailing stop".

That should get you started.


Thanks mate! That looks like what I need, but I am still very green, so it will take a while. I have searched for it already, using several different keywords, but nothing relevant came up. Thank you again though, you've been a great help.
 
710528:

Thanks mate! That looks like what I need, but I am still very green, so it will take a while. I have searched for it already, using several different keywords, but nothing relevant came up. Thank you again though, you've been a great help.


Although you wrote yourself "I can write a simple step up tailing stop"

There was nothing from you relevant from you in where to help you with your coding...

If you need help for it then we need to see your coding ....

If not.... Good luck searching...