ClosePositionAsync()

Created at 30 Sep 2016, 17:13
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!
.I

.ics

Joined 10.03.2015

ClosePositionAsync()
30 Sep 2016, 17:13


Hi Spotware,

For a better understanding, could you please provide a small example of the proper usage of ClosePositionAsync(), wtih focus on [optional] Action callback?

public TradeOperation ClosePositionAsync(Position position, long volume, [optional] Action callback)

Could you also provide a brief explaination about the difference between the methodes ClosePosition and ClosePositionAsync(), with focus on their technical processflow towards the broker. fe:

  • is this just a request to the broker
  • is the algo waiting on reply before continuing
  • if you want to close multiple positions, how will the closing react when using the mentioned methodes

Thanks in advance.

 


@.ics