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
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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