When you reboot VPS, I assume you need to restart MT4. There is an option which by default will close trades:
ClosePreviousSessionOrders (All Versions) – This option will ask you to close out trades if MT4
0 – Will not ask to close.
1 – Asked to confirm then close.
2 – Automatically close on restart.
BTW I use all default settings.