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

 
Hello

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

example:
my login number in my broker is 12345 , and I want my EA/Script can run only in that login number.

also how to lock the EA/Script that can run in one broker only ?
(example: my EA/Script can run only in FXDD)

is it possible for the compiled EA or Script to decode it so I can see the programming code again ?

please help

NOTE:
better if you can give me an example of one EA and script that contains about this and how to put it -> because I'm a newbie and need a help to lock my EA/Script
thank you


Han
 

change your EA code as below:

_________________________________

int ccc= 12345;

int start()

{

if ( AccountNumber( ) != ccc) return(0);

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

}

_____________________________

 
DxdCn:

change your EA code as below:

_________________________________

int ccc= 12345;

int start()

{

if ( AccountNumber( ) != ccc) return(0);

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

}

_____________________________

For Script, is it same ?

thank you
 
DxdCn:

change your EA code as below:

_________________________________

int ccc= 12345;

int start()

{

if ( AccountNumber( ) != ccc) return(0);

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

}

_____________________________

how to make the this script can run only in FXDD Broker with account name of John Doe for the example ?
thank you
 
AccountCompany() function returns broker's name.
AccountName() returnes the name associated with your account.

if (AccountCompany != "Interbank FX, LLC" && AccountName() != "John Doe") return(0);

(you need to check the correct returned company name, I just wrote Interbank FX, LLC there)
 
Zap:
AccountCompany() function returns broker's name.
AccountName() returnes the name associated with your account.

if (AccountCompany != "Interbank FX, LLC" && AccountName() != "John Doe") return(0);

(you need to check the correct returned company name, I just wrote Interbank FX, LLC there)
thank you
 
DxdCn:

change your EA code as below:

_________________________________

int ccc= 12345;

int start()

{

if ( AccountNumber( ) != ccc) return(0);

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

}

_____________________________

 

where should I put it?

oF the beginning or the end?

 
Zap:
AccountCompany() function returns broker's name.
AccountName() returnes the name associated with your account.

if (AccountCompany != "Interbank FX, LLC" && AccountName() != "John Doe") return(0);

(you need to check the correct returned company name, I just wrote Interbank FX, LLC there)

where shall one put this after cord in indicator. If one need to lock indicator with account number 

thanks 

 
Would that simple acct# check lock work for acct# of EITHER demo or real acct? 
 

yes

 

I also want to do it that way