Special close all orders but... script?

 

Is there any close all orders script that closes all orders att a given time, all but the 4 best buy orders and the best 4 sell orders according to price value of the orders?

Should be able to change specific number of trades that is not to be closed, one for buy and one for sell orders.

And specific days, hours and minutes the close action should be done.

Can someone make this script if it does not exist?

//Thomas