One of the fundamental differences is the trading system setup. MQL4 is used for developing trading programs based on the order system and MQL5 is utilized to implement a positional system. In the MetaTrader 5 trading terminal there are strict delimitations between the concepts of position, order and deal. An order is a request to execute a trading operation, which may result in a trading deal. A position is the aggregate deals on a certain financial instrument. Each financial instrument can have only one position.
There are differences in work with the indicators too. MQL4 contains only 6 styles of drawing indicators whereas in MQL5 there are 18 of them. After creating a custom indicator instance in MQL5, its handle can be obtained for getting values of indicator buffers and setting up properties of the indicator itself. MQL4 does not provide this opportunity. These differences are insignificant for technical analysis and creating automatic trading systems. However, fragments of code for work with technical indicators cannot be used directly between the MQL4 and MQL5 languages.
MQL5 comprises a significantly expanded list of trading functions for work with open orders, a list of open positions, order history and deal history. In MQL4, different functions such as OrderSend(), OrderClose(), OrderCloseBy(), OrderModify(), OrderDelete() were initially incorporated for performing each trade operation. These functions can be used to open/close and delete pending orders.