Print log for Pending Order fail to fill
Created at 11 Jul 2018, 05:19
TH
Print log for Pending Order fail to fill
11 Jul 2018, 05:19
Dear cTrader,
My robot places some Pending Orders and wait to they're filled. But sometimes, account doesn't have enough free money to fill, and this Pending Order disappear with no notification.
How can I log when and which Order fail to fill?
Thanks!
ap11
12 Jul 2018, 15:43
Hi Thongbaogiaodich,
You can use PendingOrders.Cancelled event. Event arguments have a property called Reason. And in case it will be 'Rejected'
Here is the example:
It will output following log entry:
Stop order Buy EURUSD at 1.16634 was cancelled, reason: Rejected
Regards,
Andrey
@ap11