How to check is position still open or closed using position ID?

Created at 26 Oct 2019, 14:17
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
RA

radoslawkupisek

Joined 05.08.2019

How to check is position still open or closed using position ID?
26 Oct 2019, 14:17


Hi,

Please let me know how to check is position open or closed using position ID? What's more how to close exact position having ID position?

 


@radoslawkupisek
Replies

PanagiotisCharalampous
29 Oct 2019, 08:26

Hi radoslawkupisek,

One way to check if the position is open or closed is to check if it is included in the Positions collection. If yes, it is still open else it is closed.

Best Regards,

Panagiotis


@PanagiotisCharalampous