How to know an account is belong to MT4 or MT5

 

Hi all,

I'm developing a trading system, but don't know how to separate MT4 account and MT5 account. Any suggestion? Thanks! 

 
tranthanhnam:

Hi all,

I'm developing a trading system, but don't know how to separate MT4 account and MT5 account. Any suggestion? Thanks! 

what??

 
tranthanhnam:

Hi all,

I'm developing a trading system, but don't know how to separate MT4 account and MT5 account. Any suggestion? Thanks! 

Do you mean MQL4 code and MQL5 code?

Here are articles about cross plattform EAs: https://www.mql5.com/en/users/iceron/publications

Look at the code and learn form that!

Enrico Lambino
Enrico Lambino
  • www.mql5.com
This article discusses the CSignal and CSignals classes which will be used in cross-platform expert advisors. It examines the differences between MQL4 and MQL5 on how particular data needed for evaluation of trade signals are accessed to ensure that the code written will be compatible with both... Cross-Platform Expert Advisor: Order Manager...
 
Mohamad Zulhairi Baba:

what??

I mean how to know account which client login in my system is belong to MT4 or MT5, so I can provide to them suitable platform instead client must send to me version of their account.
 
Carl Schreiber:

Do you mean MQL4 code and MQL5 code?

Here are articles about cross plattform EAs: https://www.mql5.com/en/users/iceron/publications

Look at the code and learn form that!

I mean how to know account which client login in my system is belong to MT4 or MT5, so I can provide to them suitable platform instead client must send to me version of their account.

Example: Account MT4 cannot deploy an EA mql5.

 
Why cant you add 1 questionnaire line in client/s registration form,from where client have to choose one,either MT4 or MT5,so that latterly every client fall in their appropriate category in your clients list
 
This is a user's forum not Metaquotes. We users can't do anything.  But some of us use both.
 

tranthanhnam:

Hi all,

I'm developing a trading system, but don't know how to separate MT4 account and MT5 account. Any suggestion? Thanks! 

Good luck but i don't think its possible
 

Hi

Maybe this can help you in the right direction.


Use this script AccountInfoString(ACCOUNT_SERVER)

https://www.mql5.com/en/docs/account/accountinfostring


You can use the name of the broker or server to check if your code is running on a MT4 or MT5 terminal. 

Since there will be a difference in servername between a MT4 server or MT5 server.

Documentation on MQL5: Account Information / AccountInfoString
Documentation on MQL5: Account Information / AccountInfoString
  • www.mql5.com
Account Information / AccountInfoString - Reference on algorithmic/automated trading language for MetaTrader 5
Reason: