How to limit the number of users using my EA" category?

Hello everyone,

I am looking for a way to remotely control my EA copies. Lets imagine i gave out few EA’s to somebody, i want to be able to turn it on and off remotely, (kind of licensing). Selling it via website market is not an option. Main condition is that to be able to control them seperately. Please help…

Perhaps something like here https://www.mql5.com/en/articles/359 5. Remote licenses

But for mql4!

Can that of MQL5 be applied to MQL4?

Thats what i want to know!

MQL4 and MQL5 are pretty much the same. The only exception is trading functions. You can change extensions for the codes from the article and try to compile them under MT4. Chances are they will compile ok, and even if not, you’ll be able to resolve errors by simple patches.

Could be possible. What about WebRequest() function? If i understood correctly, the ea can send request to login to websites, if fail it returns fail. Basically this can be used as license. Just ban or unban clients password.

WebRequest works in MT4. You can use it for websites requiring authentication, but not all methods of authentication can be supported.

I have been using the start-stop control for my clients, and actually I do not have real problem with using the webrequest. It is a simple command and works well when you are happy with its synchronized behaviour,i.e. your EA stops until the request is returned or expires (may take half a minute sometimes).

On the other hand I have problem with identifying the user’s computer, which sent the webrequest. I did not find any reliable method, which would give me a unique identifier of the computer. There are cloned systems on VPS returning the same HW and SW data, Unix and Mac emulators which have often dummy implementation of core Windows data functions.

Your only resort is probably identification of a user instead of a PC, and then you can limit a number of simultaneous connections every logged in user can establish on your back-end and use your service.

I was thinking, that we can sell license in such way, using WebRequest() to login to website. If we want to cancel subscription, just change account password and EA won’t work. And vs if we want to turn ea in, just resume account password. Could you please explain how to work with other servers, websites. In the info there is only mql5.com login method. For example if i want to make it login to my website to do some actions.

Well, Windows user profile to be precise. Simple checking simultaneous connections generates traffic, so occasional authentication of the user is more relaxed for both ends.

Not sure how to help, the MT4 behaves as a frontend sending a request, and a simple (PHP or whatever) script and a (MySQL) database are on the server side to generate a response (with your authentication result or a command).

I don’t get you. I did not suggest to use Windows profile, if this is your requirement, you’ll have to deal with some other software layer than pure MT. Also, there is no any additional traffic: the server just checks its local DB for a user state, and if a client (MT) is already connected for provided credentials new log in attempt will fail.

Never mind, I do not intend to analyse what is the best, it depends on coder’s policy. If you name winapi a layer, then yes, I need it to identify the environment before the webrequest is invoked. But it is not the topic here.

The MQL webrequest does not work with indicators, and it is also working synchronously. For indicators I need asynchronous web request, so I use wininet anyway.