Here is a script to Close All Active Order (Buy and Sell)
Download Link: Close All Active Order
Source Code : Close All Active Order Source Code
Disclaimer: If you downloaded and want to use this script, please test it at Demo account first before using it on the real Account. I have no guarantee over this script/software and I will not be taken responsible for any losses that incurred by using this script. Use it at your own Risk !