Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
The file you provided is not your code. It is part of the MQL5 Standard Library and we all have it on our systems.
If you need help with your code, then please show your code, and use the CODE button (Alt-S) when inserting code.
There is no such MQL5 function. Please reference the documentation ...
Returns the symbol corresponding to the open position
Chooses an open position for further working with it
Selects a position to work with by the ticket number specified in it
For selection by an index, use PositionGetSymbol, which selects by the index and returns the symbol of the selected position.

- www.mql5.com
I suggest you read the online book ...
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.

- www.mql5.com
There is no such MQL5 function. Please reference the documentation ...
Returns the symbol corresponding to the open position
Chooses an open position for further working with it
Selects a position to work with by the ticket number specified in it
For selection by an index, use PositionGetSymbol, which selects by the index and returns the symbol of the selected position.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I just download the official Metatrader 5.
When I coded, I received the error: 'PositionSelectByIndex' - undeclared identifier
In the file Trade.mqh, I don't see any reference to the PositionSelectByIndex.
I'm using a pure MQL5 environment, in windows software. And I don't install MT4 in my PC.
Someone could help me?
Attached the Trade.mqh installed by the MT5 download.
I am using the version 5.00 build 4755 from 13 Dec 2024
Thank you!
Pedro