I have an interesting situation, where i need order select filtering the still opened from closed trades, via ticket in a loop.
This is the code i am using :
and from printing out values and many observations, the order select returns a non-existent order(a closed one), it returns its ticket correct, and all its properties, but its closed.
Does anyone know how to fix this, or substitute it(give an alternative)?
No! An OrderSelect() by SELECT_BY_TICKET will always select that order, irrespective of whether it is Open or Closed. The "pool" parameter is only valid when using SELECT_BY_POS.
EDIT: Looks like @Alain Verleyen posted it before me!