How to retrieve computer name on MT5

 
I need to get information such as computer name and IP address on the terminal where I run my EA.

Did you have any solution?

Thank you.
 
Adi Atmanto: I need …
If you had used this you would have found these (this.)
          How can I search for indicators and other elements in this forum? - MQL5 programming forum
 
William Roeder:
If you had used this you would have found these (this.)

"and IP address"

That's a much harder question than computer name, and I'm not aware of an answer to it on this forum.

It's not simple because if, like most people, you're connecting to the internet via a router doing some sort of address translation, I'm not sure that there's anything in Windows which reliably knows your public IP address (which is presumably the address which the OP is interested in). The only way of getting the public IP address is going to be via some sort of "reflection" - for example, using WebRequest() to make a call to something like https://api.ipify.org which responds with your address as seen from out in the world.

(But then there's the probable reason for asking the question. GetComputerName() is basically meaningless outside of a corporate environment because it's effectively random, and it's user-manipulable rather than fixed. And most people don't have static IP addresses, and therefore you can't reliably and permanently identify computers via IP addresses.)

 

If you can access the log you can read it for the IP.

Or send something regularly over FTP then you can extract it from the log on the receiver side.

 
I know my IP and my computer name, but i mean how the MT5 can get the computer name and IP Address, i was use "TERMINAL" but it not working
Reason: