As the title says. How do I access individual position's information? The thought that comes to mind is looping through all of them and checking them one by one untill I find the one I want. But how do I do that?
If this was some other programming language I could do this but this doesn't work here because PositionGetSymbol(index) doesn't hold any information(?)
Don't make up fantasy functions when they exist already.
PositionGetSymbol() is the start of position analyzing process. it gives you the symbol string, AND SELECTS THE POSITION FOR FURTHER OPERATIONS.
so after you check the symbol, use the other attributes of the position. (retrieve these data using PositionGetDouble and PositionGetInteger ....)
So, the process is :
loop through open positions as you did.
get the symbol (and check if it's the one you want to process)
then get other properties and also filter the positions matching your needs.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
As the title says. How do I access individual position's information? The thought that comes to mind is looping through all of them and checking them one by one untill I find the one I want. But how do I do that?
If this was some other programming language I could do this but this doesn't work here because PositionGetSymbol(index) doesn't hold any information(?)