Need help with a simple EA

 

Hello,
I want to control my open lot and want to have an EA that closes an order when too many lots are used.
If I enter 1Lot as the value in the EA, all orders should be closed if I place 2Lot.
Could you help me?
I would like to avoid that I set too much lot out of greed. So I enter a fixed size and the EA closes everything if too much lot is used.


Thanks.

 
It may be for Freelance sorry
 
So you want to close the 2 lot order? Or all the 1 lot orders? (Doesn't make much sense to me, since the 1 lot orders might be profitable?)
 
daybyter:
So you want to close the 2 lot order? Or all the 1 lot orders? (Doesn't make much sense to me, since the 1 lot orders might be profitable?)
i want to close all new orders if i set more than 1 lot for example. Maximum is X Lot that i set up in my EA. All that is more, the EA has to close it.
Reason: