Is there a way to get a unique and constant identifier for someone's mql5 account inside of a mq5 indicator script? - page 2
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Why are you reinventing the wheel? Why not just use this site's Market functionality which already has a licensing system in place.
Just have your buddy sell his indicator here in the Market Place.
Hello!
I'm brand new to metatrader but I work professionally as a programmer. I'm also brand new to these forums as well so I'm sorry if I'm overlooking some information out there. I'm working on a side project for a buddy of mine where I'm trying to create a remote licensing server for an indicator using this extremely helpful tutorial https://www.mql5.com/en/articles/359
What I would like to do is have the .mq5 indicator code send the python XML-RPC server a request that contains some sort of unique identifier that identifies the users mql5 account. What I wish that existed was a function called like ACCOUNT_USERNAME() that would give me the username that appears in the top right profile of metatrader. For example my mql5 community account username is "ginjahd". Is there some way I can get this username within the mq5 indicator code?
I found this documentation https://www.mql5.com/en/docs/constants/environment_state/accountinformation but it seems like all of the account info inside of it is related to broker accounts. From my limited understanding, it seems like a user could change their broker and thus these strings and account numbers returned by these functions could change and not be constant. I almost need something like the serial number of a users motherboard on their PC to be sent in the http request (I'm not going to do this but this is an idea I had, I needs some sort of unique identifier) Thank you for anyone who takes time to read this!
This is my code snippet in OnInit() but it seems like these values are not constant and will change depending on what the user chooses for their broker account