How to lock EA/Script based on the login account name?

 

I need a help how to lock my EA/Script based on my login account name ?

how to make the this script can run only account name of jeo mex for the example ? 

 
win19:

I need a help how to lock my EA/Script based on my login account name ?

how to make the this script can run only account name of jeo mex for the example ? 

https://www.mql5.com/en/articles/359

Securing MQL5 code: Password Protection, Key Generators, Time-limits, Remote Licenses and Advanced EA License Key Encryption Techniques
Securing MQL5 code: Password Protection, Key Generators, Time-limits, Remote Licenses and Advanced EA License Key Encryption Techniques
  • 2012.02.17
  • investeo
  • www.mql5.com
Most developers need to have their code secured. This article will present a few different ways to protect MQL5 software. All examples in the article will refer to Expert Advisors but the same rules can be applied to Scripts and Indicators. The article starts with simple password protection and follows with key generators, licensing a given...
 
win19:

I need a help how to lock my EA/Script based on my login account name ?

how to make the this script can run only account name of jeo mex for the example ? 

if(AccountName()!="win19") ( Print("Wrong Name") ; return; }
 
Icham Aidibe:

https://www.mql5.com/en/articles/359

thank you

 
Siti Latifah:

thank you

where should I put it?

 
win19:

thank you

where should I put it?

you can put below

OnTick()

{

..............



}

 
win19: where should I put it?
Siti Latifah: you can put below OnTick()
Don't try to use any price or server related functions in OnInit (or on load,) as there may be no connection/chart yet:
  1. Terminal starts.
  2. Indicators/EAs are loaded. Static and globally declared variables are initialized. (Do not depend on a specific order.)
  3. OnInit is called.
  4. For indicators OnCalculate is called with any existing history.
  5. Human may have to enter password, connection to server begins.
  6. New history is received, OnCalculate called again.
  7. New tick is received, OnCalculate/OnTick is called. Now TickValue, TimeCurrent and prices are valid.
 
Siti Latifah:

you can put below

OnTick()

{

..............



}

thank you

 
whroeder1:

thank you

 
win19:

thank you

hello win19

i still dont understand can u help me

 
Comments that do not relate to this topic, have been moved to "Off Topic Posts".
Reason: