Getting the symbol of an open position and comparing it to the symbol of the chart the expert advisor is attached to
Have you been reading the documentation? If you just scan the Trade Functions you can quickly see the answer:
Or if you already have a ticket number selected, then use PositionGetString() with POSITION_SYMBOL.
- www.mql5.com
Have you been reading the documentation? If you just scan the Trade Functions you can quickly see the answer:
Or if you already have a ticket number selected, then use PositionGetString() with POSITION_SYMBOL.
i must have missed it but i had only tried the POSITION_SYMBOL without first getting the ticket number and it kept returning the implicit conversion from number to string error. Thanks it has worked now.
i must have missed it but i had only tried the POSITION_SYMBOL without first getting the ticket number and it kept returning the implicit conversion from number to string error. Thanks it has worked now.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use