How to incorporate this type of trailing stop?

 

Hi,

I currently have a system that opens a trade almost every 5 minutes.

I'm currently trying to wrap my head around creating a trailing stop loss that does something like this:

"when price moves to 5 pips in profit stoploss is moved to entry when price moves to 8 pips in profit stoploss moves to 4 pips"

Would really help a ton if you can share code/ideas that I can incorporate into my EA or run as a standalone script/EA.

Thank you

 
marth tanaka:

Hi,

I currently have a system that opens a trade almost every 5 minutes.

I'm currently trying to wrap my head around creating a trailing stop loss that does something like this:

"when price moves to 5 pips in profit stoploss is moved to entry when price moves to 8 pips in profit stoploss moves to 4 pips"

Would really help a ton if you can share code/ideas that I can incorporate into my EA or run as a standalone script/EA.

Thank you

This is a custom request and you can post it in Freelance section.

Reason: