Close trade in two parts by ATR ... How???

 

Hi Guys,

I'm sure this must have been asked and answered a hundred time before but somehow I can't seem to find the right answers...

I am looking for an MQL4 code snippet or preferrably an existing EA that closes trades in two parts based on the ATR.

Let's say I open a trade manually. The EA must control the trade and close let's say 70% when the ATR is reached, i.e. 0.0012 (12 pips). This is the first profit target.

The remaining part of the trade must close when the second profit target is reached which is ATR times 2. (24 pips)

Who can help me out here?

Maurice

Reason: