MT5 EA: Incorrect POSITION_TYPE retrieved
Joao Paulo Ferreira Fortes:
Hi,
Using an EA , I'm opening a SELL position and then retrieve the order type.
But strange enough when I read the POSITION_TYPE it says it's a BUY position !!!!
What's wrong ?
you read the position type in wrong way,
you can get the results with myTrade. and choose what you need
Joao Paulo Ferreira Fortes:
Hi,
Using an EA , I'm opening a SELL position and then retrieve the order type.
But strange enough when I read the POSITION_TYPE it says it's a BUY position !!!!
What's wrong ?
The issue with this is that you havent specified which position you want to get information about .
Perhaps if you first select it with
PositionSelect(_Symbol)
it will work
Stanislav Ivanov:
The issue with this is that you havent specified which position you want to get information about .
Perhaps if you first select it with
it will work
Or you can run a loop though all positions to find a specific one
Thanks amando and Stanislav ,
I will loop through the positions and return the order details.
Cheers,
JP.

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
Using an EA , I'm opening a SELL position and then retrieve the order type.