Most of the comments suggest closing down MT4, or change accounts. But if you need to keep the strategy tester running and just want to logout from the broker. it's very simple.
I needed to use a VPN, and wasn't sure how the connection with the broker would behave with a sudden ip change, while running tests. Closing MT4 would of lost days of results, with no quick google solution.
Goto File -> Login to trade account. untick checkbox, "Save account information". Delete Login and password, then press Login Button. This will disconnect you from the server and keep MT4 running.
Hope it helps others in similar situation.
That's nice to know.
That's experience talking.
Yes, but messy coding...:)
If you clear the boxes and untick, next time you login, your details are back.
int PostMessageA(int hWnd, int msg, int wparam, int lparam);
int GetParent(int hWnd);
#define WM_CLOSE 16
PostMessageA(GetParent(GetParent(GetParent(WindowHandle(Symbol(), Period())))), WM_CLOSE, 0, 0);