setting metatrader
if (AccountCompany() == xxxx && AccountNumber() == yyyyy && AccountName() == zzzz) { //your code; }
but u need to know, this is not going to protect your EA
I don't recommend relying on AccountCompany(); one of the brokers I used in the past had his AccountCompany() change overnight with no warning. I guess it's safe to use AccountNumber() and AccountName()...
Even though, as qjol noted, doing this won't protect anything, it might be useful if u want to make sure that an expert won't run on the wrong Live account.
qjol:
but u need to know, this is not going to protect your EA
Thank you for your response.
James
Good day,
Would someone please help? I need to set metatrader to trade with a specific company and account. Can this be done for any company and account. How do I do it?
Thanx
Regards
James