Close all positionos at once

Created at 30 Jul 2018, 17:41
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!
alexander.n.fedorov's avatar

alexander.n.fedorov

Joined 02.01.2018

Close all positionos at once
30 Jul 2018, 17:41


Dear Panagiotis,

In cTrader when I push button "CloseAll", all the positions are closed almost immediately

when I use a code like

"

foreach (var position in Positions)

{

ClosePosition(position);

}

"

it takes a lot of time

Is there a way to close all the postions at once?

Regards,

Sasha


@alexander.n.fedorov
Replies

PanagiotisCharalampous
30 Jul 2018, 17:45

Hi Sasha,

Use ClosePositionAsync.

Best Regards,

Panagiotis


@PanagiotisCharalampous

alexander.n.fedorov
30 Jul 2018, 17:52

Thank you!

 


@alexander.n.fedorov