Check whether currency has opened positions

 

Hello,


I really don't know how to check if there is an open position on selected currency. For example: I have 2 opened positions on GBPUSD and USDJPY and I would like to check if there are any open positions on USDJPY.


How to programme it?





Regards!

 

why dont guys like you dont read the docs ?

i cant really understand someone who trys to programm and dont read the manual from beginning until the end

ok, sometimes one may oversee some functions.

try this

https://docs.mql4.com/trading/OrderSymbol

 

Thank you. I haven't seen this!


I was looking for it in manual but I didn't find it. Sorry.


Thank's for help!

 
tilosag:

Thank you. I haven't seen this!


I was looking for it in manual but I didn't find it. Sorry.


Thank's for help!

no problem in this case.

i give you one tip.

if you think that a function is needed in any programming language, a lot of others have had the same thought before you (in most cases)

and have implemented the function already to solve their problem.

you have only to find it.

thats my experience in over 25 years of programming.


good luck

Reason: