Download MetaTrader 5
To add comments, please log in or register
Log in to MQL5.community using OpenID. It is convenient!
Laszlo Komka
390
Laszlo Komka 2013.06.11 15:28 

have any functions? any suggestion?

thanx phil

Alain Verleyen
Moderator
29594
Alain Verleyen 2013.06.11 16:11  
phil09:

have any functions? any suggestion?

thanx phil

Your question isn't very clear. You can select the open position for a selected symbol with

bool  PositionSelect(string  symbol);
Then you can use others functions to get position properties. Is it what you need ?
Laszlo Komka
390
Laszlo Komka 2013.06.11 16:43  
angevoyageur:

Your question isn't very clear. You can select the open position for a selected symbol with

Then you can use others functions to get position properties. Is it what you need ?

not really...

in MT5 when I open multiple positions in different volume (buy or sell) I have only one open position calculated by weighted average method. On the chart indicates this a green horizontal line. 

at this time i didn't find a return value, or something like this,

it seems to i have to write a custom function :(

phil

Alain Verleyen
Moderator
29594
Alain Verleyen 2013.06.11 17:45  
phil09:

not really...

in MT5 when I open multiple positions in different volume (buy or sell) I have only one open position calculated by weighted average method. On the chart indicates this a green horizontal line.

You can't open multiple positions, you send several orders which results in 1 opened position (for 1 symbol).


at this time i didn't find a return value, or something like this,

it seems to i have to write a custom function :(

phil

Which returned value ? What information do you need ?
Laszlo Komka
390
Laszlo Komka 2013.06.12 11:18  

I need the green line (return) value.

pic attached:

Files:
mql5-re.png 16 kb
Dua Yong Rew
5207
Dua Yong Rew 2013.06.12 11:59  
phil09:

I need the green line (return) value.

pic attached:

after using position select

you need to use position integer with POSITION_PRICE_OPEN

Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Position Properties
Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Position Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Trade Constants / Position Properties - Documentation on MQL5
/
To add comments, please log in or register