How to detect a failed fill of a PendingOrder

Created at 28 Dec 2015, 15:09
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!
HI

hichem

Joined 17.12.2012

How to detect a failed fill of a PendingOrder
28 Dec 2015, 15:09


Dear Spotware and developers,

How can I detect using the cAlgo API when the liquidity provider fail to fill a PendingOrder ?

 

Best regards


@hichem
Replies

ClickAlgo
28 Dec 2015, 22:56

Hello Spotware,

I would like this answer too, I need to capture the event when a pending order is rejected while it is getting filled which could be hours after it has been placed.

It looks like the OnError event method captures errors that occur with Positions, could this method get called when a pending order is rejected for any reason? If not does anybody know of a way to get the TradeResult of a rejected pending order.

protected override void OnError(Error error)
{
    var result = error.TradeResult;
    Print(result);
}

Many Thanks.


@ClickAlgo

Spotware
29 Dec 2015, 10:58

Dear Traders,

Currently there is no way to detect a rejected pending order after it was successfully placed. We will consider implementing it in the future. Stay tuned.


@Spotware