ceejay1962: I've programmed MQL5 for a while but don't know much about MQL4 a
MT4, orders are pending or opened. MT5, opened orders are positions. Do a position loop, and read the results.
MT5: first select a position via CPositionInfo, directly, or by 'MT4Orders' library (2016)
MT5 OrderType equivalent.
OrderType() Functionality in MQL5 - General - MQL5 programming forum #1 (2022)
William Roeder #:
MT4, orders are pending or opened. MT5, opened orders are positions. Do a position loop, and read the results.
MT5: first select a position via CPositionInfo, directly, or by 'MT4Orders' library (2016)
MT5 OrderType equivalent.
OrderType() Functionality in MQL5 - General - MQL5 programming forum #1 (2022)
Thanks for the links, much appreciated.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
I've programmed MQL5 for a while but don't know much about MQL4 and I need to convert some MQL4 code with trade function to work with MQL5.
As far as I can see, MQL4 deals with both positions/orders with the same functions, whilst MQL5 has separate functions for positions/orders.
For example, am I correct in assuming that to convert the trade function in the MQL4 example code below, I'd need to separate it out and use Positionxxx for BUY/SELL and Orderxxx for SELLSTOP/BUYSTOP?
Thanks