Why?
Normally the terminal can connect only to one account. For two account you have to start two terminals and on each you have to start your EA. So each running EA trades on one account.
Why?
Normally the terminal can connect only to one account. For two account you have to start two terminals and on each you have to start your EA. So each running EA trades on one account.
Hello,
I'm Sorry, there maybe a misunderstanding.
My conditional compilation, is do with executing Functions, classes, enum, etc
So my conditions would involve not allowing function,class, emun to B terminal. Only A terminal can access.
Edit: Only one terminal is open at any stage.
No conditional compilation is possible or necessary. Check have the EA check for the appropriate account number and stop if wrong.
I tried this, but I don't want the terminal closed, just end the EA and leave terminal active.
if(AccountNumber()!=My_Account) Wrong_Account(); if(AccountNumber()!=My_Account) return(0);and this
void Wrong_Account() {MessageBox("You Do Not Have The Correct Account Number. ","Account Information Incorrect ",0); //TTT= !IsStopped(); TTT=TerminalClose(0); }
So why did you call TerminalClose and not ExpertRemove?
Thanks whroeder1,
I didn't see that one.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello everyone,
I have two demo accounts at the moment in which I test my EA's. I don't want both the EA's to be capable of being enabled on both accounts.
Can I use a conditional compilation to prevent this from happening?
If it possible, please elaborate on steps to achieve this.