Day Filter & Close All Order

Hello guys

Can somebody help/show me how to add "Day Filter" & "Close All Order" function. For e.g if someone doesn't want to trade on Friday(select friday for both function), then the function should not open any new trade on fridays and also should automatically close all open orders/pending orders of the previous days.

Thanks in advance

Regards
Try here: Close all orders search & No trading on Friday search
Thankyou guyz