is it possible to convert EX4 file to MQ4 file.

 
is it possible to convert EX4 file to MQ4 file.
 
kchandek:
is it possible to convert EX4 file to MQ4 file.
Not at all. And anyway it's not legal.
 
angevoyageur:
Not at all. And anyway it's not legal.
Well said ...
 
FerruFx:
Well said ...

I have below code in my EA

 

    if (lots*margin > AccountFreeMargin()) 

lots = AccountFreeMargin() / margin;

 

If I put Account number in the brackets i.e. ()  & compile EA which make EX4 file then will I be able to restrict my EA to specific account number only. 

 
kchandek:

I have below code in my EA

 

lots = AccountFreeMargin() / margin;

 

If I put Account number in the brackets i.e. ()  & compile EA which make EX4 file then will I be able to restrict my EA to specific account number only. 

So in other words, you want to protect an EA that you have illegally decompiled ?
 
FerruFx:
So in other words, you want to protect an EA that you have illegally decompiled ?
I don't think so. He wants to protect his EA and ask if it's possible to get a mq4 file from an ex4. If it was possible it's not worth to add protection in the code.
 
angevoyageur:
I don't think so. He wants to protect his EA and ask if it's possible to get a mq4 file from an ex4. If it was possible it's not worth to add protection in the code.
Yes you are right ... That was my point ...
 

Regarding the solution, don't forget that protect code using account number must work with demo accounts too, if you will enable your users use it.

In this sense, you have to enable demo accounts and/or check if you are really using a real account.

 
figurelli:

Regarding the solution, don't forget that protect code using account number must work with demo accounts too, if you will enable your users use it.

In this sense, you have to enable demo accounts and/or check if you are really using a real account.

Nice point. It would be great if you could share a couple of sample code for doing that job or any link we can learn that. 

Kind regards. 
 
FinanceEngineer:
Nice point. It would be great if you could share a couple of sample code for doing that job or any link we can learn that. 

Kind regards. 

To be honest, I don't think that Account Number limitation is a good idea for customers.

Anyway, maybe a good start to do this is study more Account Properties (link below).

https://www.mql5.com/en/docs/constants/environment_state/accountinformation 

For instance, ENUM_ACCOUNT_TRADE_MODE and ACCOUNT_TRADE_MODE_REAL can help you identify and protect just real accounts.

Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Account Properties
Documentation on MQL5: Standard Constants, Enumerations and Structures / Environment State / Account Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Environment State / Account Properties - Documentation on MQL5
 
hello good afternoon I have a very good indicator that only fits for mt4 and I would love to know if it is possible I convert it to the mt5
Reason: