Code for order entry/exit

 

I would like to ask if someone would show me how to write the code to do the following (example): BUY 2 units of EUR/USD at 1.3000. IF then, set STOPLOSS at 1.2950 for both units. Next, set a LIMIT order to SELL 1 unit @ 1.3025. IF this price level is attained, THEN cancel existing 1.2950 StopLoss and create new OCO order to SELL on a LIMIT 1 unit @ 1.3050 and STOPLOSS @ 1.3000 on the remaining outstanding 1 unit. I would appreciate someone's help writing this. I am not familiar with EA on MetaTrader4.