Discussion of article "Library for easy and quick development of MetaTrader programs (part XIII): Account object events" - page 2

 

A small clarification regarding the definition of the terminal type in the constructor:

this.m_long_prop[ACCOUNT_PROP_SERVER_TYPE]                        = (::TerminalInfoString(TERMINAL_NAME)=="MetaTrader 5" ? 5 : 4);

It would probably be more correct to write it like this:

this.m_long_prop[ACCOUNT_PROP_SERVER_TYPE] = (::StringFind(TerminalInfoString( TERMINAL_NAME), "MetaTrader 5") != -1 ? 5 : 4);

Since the broker's name may also appear there....

 
MQL_User (TerminalInfoString( TERMINAL_NAME), "MetaTrader 5") != -1 ? 5 : 4);

Since the broker's name may also appear there....

Can you please send me a link to a broker where this happens?