Can you help me to make this expert:

First I will buy (or sell) for a some price (exp. 1.400).
Suppose the market is moved in favour of me for X pips for example (5, 10 or 20 pips). So the expert will make an pending order buy limit (or sell limit) at the beginning price + Y pips (exp. 1.4000+5 or ten pips). (for selling position will be 1.400-5 or ten pips)
The expert will make a stop loss for the first position in the breakeven.
Suppose now the market is moved against me. The first position wil be closed and maybe the second position will be opened. I want the expert will do the same think fo the second position ... and for nth position.
Thank you