//+------------------------------------------------------------------+ //| PropGuardConnectionTest.mq5 | //| Drag onto any chart. Prints, in the Experts tab, whether this | //| terminal can reach the Prop Trader Guard server over HTTPS, and | //| a known HTTPS site for comparison. Add both addresses under | //| Tools > Options > Expert Advisors > Allow WebRequest first. | //+------------------------------------------------------------------+ #property script_show_inputs #property version "1.0" input string InpServer = "https://proptraderguard.fly.dev"; input string InpControl = "https://www.google.com"; void Try(const string url) { char data[]; char reply[]; string headers; ResetLastError(); int status = WebRequest("GET", url, "", 5000, data, reply, headers); int err = GetLastError(); string body = CharArrayToString(reply, 0, 80, CP_UTF8); StringReplace(body, "\n", " "); Print("PropGuardTest: ", url, " -> status ", status, ", error ", err, ", reply bytes ", ArraySize(reply), ", starts: ", body); } void OnStart() { Print("PropGuardTest: terminal build ", TerminalInfoInteger(TERMINAL_BUILD)); Try(InpServer + "/health"); Try(InpControl); }