The right way to manage Licensing in MQL4: LICENSE_TIME ?

 

Hi Guys, new MQL4 coder here 🙋‍♂️

I want to add security to my EA to prevent it from being used outside a certain time period

As I was coding this solution i stumbled up the ENUM_LICENSE_TYPE predefined variables in MQL4: https://docs.mql4.com/constants/environment_state/mql4_programm_info

I've searched on the internet and Mql4 documentation and haven't found an implementation of:

ENUM_LICENSE_TYPE, LICENSE_FREE, LICENSE_DEMO, LICENSE_FULL, LICENSE_TIME

I appreciate in advanced for your help, Sorry for my bad english



Running MQL4 Program Properties - Environment State - Constants, Enumerations and Structures - MQL4 Reference
Running MQL4 Program Properties - Environment State - Constants, Enumerations and Structures - MQL4 Reference
  • docs.mql4.com
Running MQL4 Program Properties - Environment State - Constants, Enumerations and Structures - MQL4 Reference
 

This is what I am also wondering, but in my case for mql5.

Documentation does not state how the license types are applied.

I presume that if the EA is sold on the market, depending on what option the buyer chooses, like: Demo, Rent, Full etc. That the program will return a specific enum value when something like this is called:

(ENUM_LICENSE_TYPE)(MQLInfoInteger(MQL_LICENSE_TYPE));

But with no info the only way to test would be to post an EA on the market.

 

Maybe you should read the rules: https://www.mql5.com/en/market/rules#part_III:

12. A Product removed from the Market showcase does not affect the Buyer's ability to use paid and rented Products — all Buyers can still download and install a removed Product in their MetaTrader platforms within the available number of activations. ...

So I guess this idea "being used outside a certain time period " won't work.
Rules of Using the Market Service
Rules of Using the Market Service
  • www.mql5.com
General Provisions and Conditions of Use service Market