Download MetaTrader 5
To add comments, please log in or register
Thousands of developers have already published their products in the Market. Join them!
sami awan
79
sami awan 2016.03.12 11:28 
I wrote an EA but since i am very new in programming i want my EA to work only on those trading account numbers which i include in my source code so that if any of my clients distribute my EA to any other person it should not work on that account .
What lines should i add in my EA to protect this. For example i want my EA to work only on my trading acc# 1234567 . What should i write in my EA?
Plz help
Carl Schreiber
5937
Carl Schreiber 2016.03.12 11:45  

e.g. in OnInit():

   if ( AccountNumber() != 9870987098 ) return( INIT_FAILED )

But in the editor's reference about more information about the account...

sami awan
79
sami awan 2016.03.12 11:57  
gooly:

e.g. in OnInit():

But in the editor's reference about more information about the account...


Can you please elaborate where ishould add this line? In start function?
sami awan
79
sami awan 2016.03.12 12:26  
sammiawan999:
I wrote an EA but since i am very new in programming i want my EA to work only on those trading account numbers which i include in my source code so that if any of my clients distribute my EA to any other person it should not work on that account .
What lines should i add in my EA to protect this. For example i want my EA to work only on my trading acc# 1234567 . What should i write in my EA?
Plz help
What mistake i made in attached picture?
sami awan
79
sami awan 2016.03.12 12:38  
gooly:

e.g. in OnInit():

But in the editor's reference about more information about the account...


Successfully done. Thanks alot brother:)
whroeder1
13596
whroeder1 2016.03.12 15:07  
sammiawan999:
Can you please elaborate where ishould add this line? In start function?
What mistake i made in attached picture?
  1. What part of
    gooly: e.g. in OnInit():
    was unclear?
  2. Don't attach a image, insert the image
/
To add comments, please log in or register