Is there an EA that opens&closes Multiple positions?? proper money management

 

I haven't been successful coding it myself...I want ONLY 2 buys(for example) to be placed.

1 with TP and the other without. until SELL condition happens.

THEN close all open buys and place two sells with same details.

Seems like there should be an example out there of EA's that do this??

Running on DEMO, i get 1 order placed at the completion of a bar..then the other at the next bar..

or 4 BUYS instead of just 2 or something else I don't want.

Bar closes, 2 orders get placed...nothing happens until opposite signal occurs, then repeat in opposite direction.

THANKS A TON!!!!!!!