oldest open Position price - mql5

 

 Hello,

 

now i can get the last/newest position info buy this code

 

 PositionSelect(_Symbol) ;

ulong position_ID=PositionGetInteger(POSITION_IDENTIFIER);

long create_time_msc=PositionGetInteger(POSITION_TIME_MSC);

long update_time_sec=PositionGetInteger(POSITION_TIME_UPDATE);

long update_time_msc=PositionGetInteger(POSITION_TIME_UPDATE_MSC);

 

my problem is that i need to get the oldest open position by ticket id

 

thanks in advance; 

 

waiting for help :) 

 

i have no idea what you are trying to accomplish but

ENUM_POSITION_PROPERTY_INTEGER

Identifier

Description

Type

POSITION_TIME

Position open time

datetime

is position open time so if you need the oldest i suggest you compare all of them by < is smaller then or > is larger then in a loop.

Reason: