closing all open position

 
I am absolutely programming beginner. Can you please help me to get script which close all open position with one click?

I have found here some "tags" but it is not working LIVE even if I compiled...

Thank you very much in advance.