How can I search for indicators and other elements in this forum? - MQL5 programming forum
"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.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Thank you.