Anyone out there have a function I could use to close all open positions that I could use in my EA (MT5)?

Stop all and close all trades EA 23 replies
When MT5(script) bar crosses Horizontal trendline->close position 0 replies
Close all ea (MT5) 4 replies
Looking for EA to close all Buy Or all Sell trades when in profit 0 replies
Close all trades !!! 1 reply
DislikedAnyone out there have a function I could use to close all open positions that I could use in my EA (MT5)?Ignored