Can anyone make this type of Close All EA for my grid strategy?

 

Hello guys..... i'm new here. i want to create EA that help me close all positions when my target profit is reached. usually i use EA that close all positions based on money. but i prefer to close all by the average profit in form of money not pips for all the opened trades. my strategy use Grid or layer strategy and i always use 0.01 lot each trades, and i use both direct and pending orders too. 


for example. today, i have 6 opened/running trades (all 6 trades using 0.01 lot each). and i want to close all positions that equally to 6 USD in total, so the average profit is 1 USD each. so i set the EA, i just set 1 USD as the average target profit for the all 6 opened trades. another example, next day, i have 8 opened trades (all 8 trades using 0.01 lot each) , and i set the EA, my average target profit is 1 USD, so when the profit reach 8 USD, the EA close all postions. another example, next day, i have 10 opened trades (all 10 trades using 0.01 lot each) , so once again, i set 1 USD as my average target profit, so when the profit reach 10 USD, the EA will close all postions.


can any of you make this EA for me? this kind of EA really will be great to me. this EA will be automatic count it self, how many opened trades and how much the total profit will be. for example, i have 2 trades opened and 8 pending orders. so at that time, if i set my EA the average target profit is 1 USD. the EA will wait until the total profit is 2 USD to close all positions. but if for example 30 minutes later, the total opened trades become 4 trades and the pending orders is 6 left. the EA automatically wait until the profit reach 4 USD to close all positions.  and if several hours later, all my 6 pending order trades opened too. so the total opened trades will be 10 trades and then the EA will have to wait until the total profit hit 10 USD to close all postions.


can you create that kind of EA for me? thanks before