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!
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.
i don't think you can know it just with the account number because each broker has it's own way for numbering metatrader accounts. Your customer has to inform you of the account number and the server. With the server you can probably know if it lebongs to MT4 or MT5, but this likely to fail in the future when MT4 disapears. In summary, ask your customers to answer three questions: trading platform, acc number and server address.
Maybe this can help you in the right direction.
Use this script AccountInfoString(ACCOUNT_SERVER)
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.