Closed positions: get close price and time

Created at 12 May 2022, 09:04
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!
NC

ncel01

Joined 19.03.2020

Closed positions: get close price and time
12 May 2022, 09:04


Hello,

How to get the close price and time of a closed position?

 

Thank you.


@ncel01
Replies

amusleh
12 May 2022, 09:06 ( Updated at: 12 May 2022, 09:07 )

Hi,

A closed position is a deal/trade, you have to use either Positions.Closed event or History collection, the deal has both entry time and close time.


@amusleh

ncel01
16 May 2022, 20:13

RE:

amusleh said:

Hi,

A closed position is a deal/trade, you have to use either Positions.Closed event or History collection, the deal has both entry time and close time.

Hi amusleh,

Thanks for your reply. It's working now! ????

One more question:

Is there a way to filter out from History collection the partial close trades only?

Thank you!


@ncel01

amusleh
17 May 2022, 11:11

RE: RE:

ncel01 said:

amusleh said:

Hi,

A closed position is a deal/trade, you have to use either Positions.Closed event or History collection, the deal has both entry time and close time.

Hi amusleh,

Thanks for your reply. It's working now! ????

One more question:

Is there a way to filter out from History collection the partial close trades only?

Thank you!

Hi,

No, you can't filter historical trades by type of their close.


@amusleh

ncel01
18 May 2022, 13:20

RE: RE: RE:

amusleh said:

ncel01 said:

amusleh said:

Hi,

A closed position is a deal/trade, you have to use either Positions.Closed event or History collection, the deal has both entry time and close time.

Hi amusleh,

Thanks for your reply. It's working now! ????

One more question:

Is there a way to filter out from History collection the partial close trades only?

Thank you!

Hi,

No, you can't filter historical trades by type of their close.

amusleh,

Okay, no worries. I'll create a counter for this inside Positions_Modified.


@ncel01