Forex



Go Back   Forex Trading > Programming > MetaTrader
Forex Forum Register More recent Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 03-21-2009, 09:49 AM
fxgrm's Avatar
Senior Member
 
Join Date: Mar 2007
Posts: 114
fxgrm is on a distinguished road
How to add multiple account # authorization in EA?

Does someone know how to add multiple account #'s in the EA before compiling it?

Here is the code in the EA:


// Use Account number as Password
// For each client change the value 54321 to their account number
int ValidAccountNumber = 12345; // Use this number for actual user account number
extern int YourAccountNumber = 12345; // User input must match ValidAccountNumber to use expert

bool UseExpire = true; // change to true for expiration
int ExpireMonth = 4;
int ExpireDay = 25;
int ExpireYear = 2009;


Do I just put some special keystroke between all the account #'S?

I would like to add all my customers #'s in 1 master EA so I can just send it out to everyone instead of an EA for each individual person to save time.

Thanks in advance

fxgrm
__________________
The M5G Cyborg EA - Target of 1-3% per Trading Day!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #2 (permalink)  
Old 03-21-2009, 11:18 AM
cja's Avatar
cja cja is offline
Senior Member
 
Join Date: Apr 2006
Posts: 676
cja is on a distinguished road
Multi Account code

Quote:
Originally Posted by fxgrm View Post
Does someone know how to add multiple account #'s in the EA before compiling it?

Here is the code in the EA:


// Use Account number as Password
// For each client change the value 54321 to their account number
int ValidAccountNumber = 12345; // Use this number for actual user account number
extern int YourAccountNumber = 12345; // User input must match ValidAccountNumber to use expert

bool UseExpire = true; // change to true for expiration
int ExpireMonth = 4;
int ExpireDay = 25;
int ExpireYear = 2009;


Do I just put some special keystroke between all the account #'S?

I would like to add all my customers #'s in 1 master EA so I can just send it out to everyone instead of an EA for each individual person to save time.

Thanks in advance

fxgrm
This is a way to do it - of course there may be a better setup.


int Account_Number1 = 12345677;
int Account_Number2 = 1234;
int Account_Number3 = 2356;
int Account_Number4 = 5678;
int Account_Number5 = 456789;
int Account_Number6 = 24572;

if (Account_Number1 !=AccountNumber())
if (Account_Number2 !=AccountNumber())
if (Account_Number3 !=AccountNumber())
if (Account_Number4 !=AccountNumber())
if (Account_Number5 !=AccountNumber())
if (Account_Number6 !=AccountNumber())
{
return(0);
}

Only 1 of the above 6 Account numbers needs to be valid for the EA/Indicator to function and of course if the User Account number does not match any numbers in the list then the EA/Indicator will not work.
__________________
My Disadvantage is that I am not a Trained Programmer - My Advantage is that I am not a Trained Programmer.
http://cjatradingtools.com/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #3 (permalink)  
Old 03-21-2009, 01:09 PM
fxgrm's Avatar
Senior Member
 
Join Date: Mar 2007
Posts: 114
fxgrm is on a distinguished road
Smile Thanks CJA!

I will give this a try. This will sure cut down on compiling EA's individually.
__________________
The M5G Cyborg EA - Target of 1-3% per Trading Day!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to run multiple EA'S Same account schoe Metatrader 4 3 05-21-2007 05:59 PM
Do you trade multiple EAs from a single account? tdion Expert Advisors - Metatrader 4 1 03-16-2007 06:47 AM
Multiple sessions of MT4 pip-gandalf Metatrader 4 4 07-03-2006 01:35 PM
Multiple EAs on the same account einvestor Metatrader 4 2 06-14-2006 05:13 PM
How do I open and close multiple orders for a single account? iboersma Questions 4 05-26-2006 02:28 PM


All times are GMT. The time now is 09:27 PM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.