You must not mix Order, Position and Deals for each exists its function, see the list on the left side: https://www.mql5.com/en/docs/trading
Read: https://www.mql5.com/en/articles/211
Orders, Positions and Deals in MetaTrader 5
MetaQuotes, 2011.02.01 16:13
Creating a robust trading robot cannot be done without an understanding of the mechanisms of the MetaTrader 5 trading system. The client terminal receives the information about the positions, orders, and deals from the trading server. To handle this data properly using the MQL5, it's necessary to have a good understanding of the interaction between the MQL5-program and the client terminal.
Documentation on MQL5: Trade Functions
- www.mql5.com
Trade Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
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
Getting this error in MT5 backtesting. Plz help to fix it.
Plz let me know if i need to provide more details.
IM 0 11:49:25.084 Core 1 2023.01.04 01:28:01 OrderSelect( 37183, SELECT_BY_POS, MODE_HISTORY ) - Error #4755