Failed to close position PID52478242 with error "ORDER_CANCELLED"

Created at 07 Aug 2016, 20:34
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!
DE

DELETED_USER

Joined 08.04.2016 Blocked

Failed to close position PID52478242 with error "ORDER_CANCELLED"
07 Aug 2016, 20:34


Hi, 

Could you have a look at the log below. 

I experienced multiple order cancellation on PositionClose(). What is causing this?

2016.08.02 13:19:21.678 | cAlgo started
2016.08.02 13:58:56.540 | cAlgo started
2016.08.02 20:55:00.690 | Limit order to Buy £ 103k GBPUSD (Price: 1.33583, SL: 1.31913, TP: 1.33763) is sent to server
2016.08.02 20:55:01.034 | Limit order to Sell € 161k EURGBP (Price: 0.84030, SL: 0.84840, TP: 0.83970) is sent to server
2016.08.02 20:55:01.206 | Limit order to Buy £ 105k GBPCAD (Price: 1.75114, SL: 1.72984, TP: 1.75334) is sent to server
2016.08.02 20:55:01.409 | → Limit order OID78941225 to Buy £ 103k GBPUSD (Price: 1.33583, SL: 1.31913, TP: 1.33763) is ACCEPTED (02/08/2016 20:55:01.069 UTC+0)
2016.08.02 20:55:01.456 | → Limit order OID78941227 to Sell € 161k EURGBP (Price: 0.84030, SL: 0.84840, TP: 0.83970) is ACCEPTED (02/08/2016 20:55:01.125 UTC+0)
2016.08.02 20:55:01.487 | → Limit order OID78941228 to Buy £ 105k GBPCAD (Price: 1.75114, SL: 1.72984, TP: 1.75334) is ACCEPTED (02/08/2016 20:55:01.265 UTC+0)
2016.08.02 20:55:05.940 | Limit order to Buy AUD 178k AUDCAD (Price: 0.99730, SL: 0.98470, TP: 0.99820) is sent to server
2016.08.02 20:55:06.065 | → Limit order OID78941231 to Buy AUD 178k AUDCAD (Price: 0.99730, SL: 0.98470, TP: 0.99820) is ACCEPTED (02/08/2016 20:55:06.003 UTC+0)
2016.08.02 20:55:49.362 | → Limit order to SELL € 161k EURGBP OID78941227 is FILLED at 0.84031, position PID52478244 (02/08/2016 20:55:49.275 UTC+0)
2016.08.02 20:55:59.846 | → Limit order to BUY AUD 178k AUDCAD OID78941231 is FILLED at 0.99730, position PID52478247 (02/08/2016 20:55:59.801 UTC+0)
2016.08.02 20:56:04.143 | → Limit order to BUY £ 103k GBPUSD OID78941225 is FILLED at 1.33582, position PID52478242 (02/08/2016 20:56:04.095 UTC+0)
2016.08.02 20:56:04.862 | → Limit order to BUY £ 105k GBPCAD OID78941228 is FILLED at 1.75109, position PID52478245 (02/08/2016 20:56:04.815 UTC+0)
2016.08.03 08:37:22.061 | → Order OID78941250 is FILLED at 0.8397, position PID52478244 closed (03/08/2016 08:37:21.838 UTC+0)
2016.08.03 08:44:44.917 | → Order OID78941258 is FILLED at 1.75337, position PID52478245 closed (03/08/2016 08:44:44.753 UTC+0)
2016.08.03 20:55:00.108 | Request to close position PID52478242 is sent to server
2016.08.03 20:55:00.155 | Request to close position PID52478242 is sent to server
2016.08.03 20:55:00.280 | Request to close position PID52478242 is sent to server
2016.08.03 20:55:00.327 | Request to close position PID52478242 is sent to server
2016.08.03 20:55:00.389 | Request to close position PID52478242 is sent to server
2016.08.03 20:55:00.436 | Request to close position PID52478242 is sent to server
2016.08.03 20:55:00.483 | Request to close position PID52478242 is sent to server
2016.08.03 20:55:00.545 | Request to close position PID52478242 is sent to server
2016.08.03 20:55:00.592 | Request to close position PID52478242 is sent to server
2016.08.03 20:55:00.639 | Request to close position PID52478242 is sent to server
2016.08.03 20:55:00.670 | Request to close position PID52478242 is sent to server
2016.08.03 20:55:00.748 | → Request to close position PID52478242 is ACCEPTED, order OID79021903 created (03/08/2016 20:55:00.256 UTC+0)
2016.08.03 20:55:00.764 | → Request to close position PID52478242 is ACCEPTED, order OID79021904 created (03/08/2016 20:55:00.304 UTC+0)
2016.08.03 20:55:00.811 | → Failed to close position PID52478242 with error "ORDER_CANCELLED"
2016.08.03 20:55:00.827 | → Request to close position PID52478242 is ACCEPTED, order OID79021905 created (03/08/2016 20:55:00.333 UTC+0)
2016.08.03 20:55:00.842 | → Failed to close position PID52478242 with error "ORDER_CANCELLED"
2016.08.03 20:55:00.952 | → Order OID79021903 is FILLED at 1.33243, position PID52478242 closed (03/08/2016 20:55:00.367 UTC+0)
2016.08.03 20:55:00.496 | Limit order to Buy AUD 101k AUDNZD (Price: 1.05976, SL: 1.05086, TP: 1.06066) is sent to server
2016.08.03 20:55:01.215 | Limit order to Sell € 59k EURCAD (Price: 1.45744, SL: 1.47174, TP: 1.45604) is sent to server
2016.08.03 20:55:01.186 | Request to close position PID52478247 is sent to server
2016.08.03 20:55:01.264 | Request to close position PID52478247 is sent to server
2016.08.03 20:55:01.311 | Request to close position PID52478247 is sent to server
2016.08.03 20:55:01.358 | Request to close position PID52478247 is sent to server
2016.08.03 20:55:01.405 | Request to close position PID52478247 is sent to server
2016.08.03 20:55:01.483 | → Failed to close position PID52478242 with error "TRADING_BAD_VOLUME"
2016.08.03 20:55:01.498 | → Failed to close position PID52478242 with error "TRADING_BAD_VOLUME"
2016.08.03 20:55:01.498 | → Failed to close position PID52478242 with error "TRADING_BAD_VOLUME"
2016.08.03 20:55:01.498 | → Failed to close position PID52478242 with error "TRADING_BAD_VOLUME"
2016.08.03 20:55:01.498 | → Failed to close position PID52478242 with error "TRADING_BAD_VOLUME"
2016.08.03 20:55:01.514 | → Failed to close position PID52478242 with error "TRADING_BAD_VOLUME"
2016.08.03 20:55:01.530 | → Failed to close position PID52478242 with error "TRADING_BAD_VOLUME"
2016.08.03 20:55:01.530 | → Failed to close position PID52478242 with error "TRADING_BAD_VOLUME"
2016.08.03 20:55:01.545 | → Request to close position PID52478247 is ACCEPTED, order OID79021909 created (03/08/2016 20:55:01.273 UTC+0)
2016.08.03 20:55:01.561 | → Request to close position PID52478247 is ACCEPTED, order OID79021910 created (03/08/2016 20:55:01.319 UTC+0)
2016.08.03 20:55:01.577 | → Failed to close position PID52478247 with error "ORDER_CANCELLED"
2016.08.03 20:55:01.608 | → Request to close position PID52478247 is ACCEPTED, order OID79021913 created (03/08/2016 20:55:01.370 UTC+0)
2016.08.03 20:55:01.623 | → Failed to close position PID52478247 with error "ORDER_CANCELLED"
2016.08.03 20:55:01.733 | → Order OID79021909 is FILLED at 0.99158, position PID52478247 closed (03/08/2016 20:55:01.377 UTC+0)
2016.08.03 20:55:01.795 | → Failed to close position PID52478247 with error "TRADING_BAD_VOLUME"
2016.08.03 20:55:01.873 | Limit order to Sell € 157k EURCAD (Price: 1.45744, SL: 1.47174, TP: 1.45604) is sent to server
2016.08.03 20:55:01.967 | → Failed to close position PID52478247 with error "POSITION_NOT_FOUND"
2016.08.03 20:55:02.014 | → Limit order OID79021914 to Sell € 157k EURCAD (Price: 1.45744, SL: 1.47174, TP: 1.45604) is ACCEPTED (03/08/2016 20:55:01.926 UTC+0)
2016.08.03 20:55:02.014 | Limit order to Sell NZD 180k NZDCAD (Price: 0.93563, SL: 0.94813, TP: 0.93423) is sent to server
2016.08.03 20:55:02.139 | → Limit order OID79021915 to Sell NZD 180k NZDCAD (Price: 0.93563, SL: 0.94813, TP: 0.93423) is ACCEPTED (03/08/2016 20:55:02.073 UTC+0)
2016.08.03 20:55:01.262 | Limit order to Sell NZD 68k NZDCAD (Price: 0.93562, SL: 0.94812, TP: 0.93422) is sent to server
2016.08.03 20:55:01.606 | → Limit order OID79021908 to Buy AUD 101k AUDNZD (Price: 1.05976, SL: 1.05086, TP: 1.06066) is ACCEPTED (03/08/2016 20:55:01.250 UTC+0)
2016.08.03 20:55:01.653 | → Limit order OID79021911 to Sell € 59k EURCAD (Price: 1.45744, SL: 1.47174, TP: 1.45604) is ACCEPTED (03/08/2016 20:55:01.336 UTC+0)
2016.08.03 20:55:01.668 | → Limit order OID79021912 to Sell NZD 68k NZDCAD (Price: 0.93562, SL: 0.94812, TP: 0.93422) is ACCEPTED (03/08/2016 20:55:01.341 UTC+0)
2016.08.03 21:05:00.137 | Request to Sell € 50k EURCAD (SL: 156, TP: 167) is sent to server
2016.08.03 21:05:00.231 | → Request to Sell € 50k EURCAD (SL: 156, TP: 167) is ACCEPTED, order OID79022028 created (03/08/2016 21:05:00.201 UTC+0)
2016.08.03 21:05:00.590 | → Order OID79022028 is FILLED at 1.45680, position PID52530443 (03/08/2016 21:05:00.256 UTC+0)
2016.08.03 21:07:26.760 | → Limit order to BUY AUD 101k AUDNZD OID79021908 is FILLED at 1.05970, position PID52530384 (03/08/2016 21:07:26.691 UTC+0)
2016.08.03 21:07:43.712 | → Limit order to SELL NZD 68k NZDCAD OID79021912 is FILLED at 0.93562, position PID52530386 (03/08/2016 21:07:43.678 UTC+0)
2016.08.03 21:08:40.153 | → Limit order to SELL NZD 180k NZDCAD OID79021915 is FILLED at 0.93571, position PID52530388 (03/08/2016 21:08:40.105 UTC+0)
2016.08.03 21:48:24.108 | → Limit order OID79021914 to SELL € 157k EURCAD is PARTIALLY FILLED for € 100k at 1.45744, position PID52530387 (03/08/2016 21:48:24.068 UTC+0)
2016.08.03 21:48:24.109 | → Limit order to SELL € 59k EURCAD OID79021911 is FILLED at 1.45744, position PID52530385 (03/08/2016 21:48:24.062 UTC+0)
2016.08.03 21:48:28.108 | → Limit order to SELL € 157k EURCAD OID79021914 is FILLED at 1.45744, position PID52530387 (03/08/2016 21:48:28.058 UTC+0)
2016.08.03 22:17:15.920 | → Order OID79022096 is FILLED at 1.06066, position PID52530384 closed (03/08/2016 22:17:15.724 UTC+0)
2016.08.04 00:04:58.265 | → Order OID79022633 is FILLED at 1.45603, position PID52530385 closed (04/08/2016 00:04:58.144 UTC+0)
2016.08.04 00:04:58.312 | → Order OID79022634 is FILLED at 1.45603, position PID52530387 closed (04/08/2016 00:04:58.146 UTC+0)
2016.08.04 01:03:48.048 | → Order OID79022101 is FILLED at 0.93418, position PID52530386 closed (04/08/2016 01:03:47.936 UTC+0)
2016.08.04 01:03:48.076 | → Order OID79022110 is FILLED at 0.93418, position PID52530388 closed (04/08/2016 01:03:47.926 UTC+0)
2016.08.04 20:55:00.219 | Limit order to Sell £ 74k GBPJPY (Price: 132.680, SL: 135.000, TP: 132.460) is sent to server
2016.08.04 20:55:00.344 | → Limit order OID79110520 to Sell £ 74k GBPJPY (Price: 132.680, SL: 135.000, TP: 132.460) is ACCEPTED (04/08/2016 20:55:00.279 UTC+0)
2016.08.04 20:55:00.391 | Limit order to Sell £ 63k GBPCAD (Price: 1.70645, SL: 1.74145, TP: 1.70295) is sent to server
2016.08.04 20:55:00.453 | Limit order to Buy € 98k EURGBP (Price: 0.84901, SL: 0.83591, TP: 0.85021) is sent to server
2016.08.04 20:55:00.562 | → Limit order OID79110521 to Sell £ 63k GBPCAD (Price: 1.70645, SL: 1.74145, TP: 1.70295) is ACCEPTED (04/08/2016 20:55:00.450 UTC+0)
2016.08.04 20:55:00.594 | → Limit order OID79110522 to Buy € 98k EURGBP (Price: 0.84901, SL: 0.83591, TP: 0.85021) is ACCEPTED (04/08/2016 20:55:00.533 UTC+0)
2016.08.04 20:55:00.875 | Limit order to Sell £ 65k GBPAUD (Price: 1.71858, SL: 1.75288, TP: 1.71478) is sent to server
2016.08.04 20:55:00.922 | Limit order to Sell £ 79k GBPUSD (Price: 1.31083, SL: 1.33223, TP: 1.30863) is sent to server
2016.08.04 20:55:01.000 | → Limit order OID79110524 to Sell £ 65k GBPAUD (Price: 1.71858, SL: 1.75288, TP: 1.71478) is ACCEPTED (04/08/2016 20:55:00.934 UTC+0)
2016.08.04 20:55:01.047 | → Limit order OID79110525 to Sell £ 79k GBPUSD (Price: 1.31083, SL: 1.33223, TP: 1.30863) is ACCEPTED (04/08/2016 20:55:00.990 UTC+0)
2016.08.04 20:55:15.172 | → Limit order to SELL £ 79k GBPUSD OID79110525 is FILLED at 1.31083, position PID52593091 (04/08/2016 20:55:15.091 UTC+0)
2016.08.04 20:55:15.234 | → Limit order to BUY € 98k EURGBP OID79110522 is FILLED at 0.84901, position PID52593088 (04/08/2016 20:55:15.099 UTC+0)
2016.08.04 20:55:15.406 | → Limit order to SELL £ 63k GBPCAD OID79110521 is FILLED at 1.70645, position PID52593087 (04/08/2016 20:55:15.295 UTC+0)
2016.08.04 20:55:15.594 | → Limit order to SELL £ 65k GBPAUD OID79110524 is FILLED at 1.71861, position PID52593090 (04/08/2016 20:55:15.352 UTC+0)
2016.08.04 21:05:00.067 | Request to Buy € 38k EURGBP (SL: 125, TP: 152) is sent to server
2016.08.04 21:05:00.177 | → Request to Buy € 38k EURGBP (SL: 125, TP: 152) is ACCEPTED, order OID79110585 created (04/08/2016 21:05:00.129 UTC+0)
2016.08.04 21:05:00.317 | → Order OID79110585 is FILLED at 0.84939, position PID52593128 (04/08/2016 21:05:00.234 UTC+0)
2016.08.04 21:17:30.172 | → Limit order to SELL £ 74k GBPJPY OID79110520 is FILLED at 132.692, position PID52593086 (04/08/2016 21:17:30.116 UTC+0)
2016.08.05 03:15:50.815 | → Order OID79110532 is FILLED at 1.71477, position PID52593090 closed (05/08/2016 03:15:50.579 UTC+0)
2016.08.05 12:31:05.609 | → Order OID79110529 is FILLED at 1.30855, position PID52593091 closed (05/08/2016 12:31:04.742 UTC+0)
2016.08.05 13:02:31.927 | → Order OID79110722 is FILLED at 132.46, position PID52593086 closed (05/08/2016 13:02:31.717 UTC+0)
2016.08.05 13:08:06.361 | → Order OID79110530 is FILLED at 0.85027, position PID52593088 closed (05/08/2016 13:08:06.196 UTC+0)
2016.08.05 20:55:00.190 | Request to close position PID52593087 is sent to server
2016.08.05 20:55:00.503 | → Request to close position PID52593087 is ACCEPTED, order OID79208671 created (05/08/2016 20:55:00.303 UTC+0)
2016.08.05 20:55:00.690 | Request to close position PID52593087 is sent to server
2016.08.05 20:55:00.753 | Request to close position PID52593087 is sent to server
2016.08.05 20:55:00.909 | → Order OID79208671 is FILLED at 1.72181, position PID52593087 closed (05/08/2016 20:55:00.560 UTC+0)
2016.08.05 20:55:01.034 | → Failed to close position PID52593087 with error "TRADING_BAD_VOLUME"
2016.08.05 20:55:01.097 | → Failed to close position PID52593087 with error "POSITION_NOT_FOUND"

 

 

Thanks!

 


Replies

DELETED_USER
11 Aug 2016, 11:36

I experienced the same issue again yesterday. 

Request to close position PID52853703 is sent to server
2016.08.10 20:55:02.962 | → Request to close position PID52853703 is ACCEPTED, order OID79474546 created (10/08/2016 20:55:02.926 UTC+0)
2016.08.10 20:55:02.993 | Request to close position PID52853703 is sent to server
2016.08.10 20:55:03.071 | Request to close position PID52853703 is sent to server
2016.08.10 20:55:03.118 | Request to close position PID52853703 is sent to server
2016.08.10 20:55:03.180 | Request to close position PID52853703 is sent to server
2016.08.10 20:55:03.368 | → Order OID79474546 is FILLED at 1.11756, position PID52853703 closed (10/08/2016 20:55:02.999 UTC+0)
2016.08.10 20:55:03.462 | → Failed to close position PID52853703 with error "TRADING_BAD_VOLUME"
2016.08.10 20:55:03.462 | → Failed to close position PID52853703 with error "TRADING_BAD_VOLUME"
2016.08.10 20:55:03.477 | → Failed to close position PID52853703 with error "TRADING_BAD_VOLUME"
2016.08.10 20:55:03.587 | → Failed to close position PID52853703 with error "TRADING_BAD_VOLUME"

 

A close position request is sent to the server which is accepted. Why is the request sent another 4 times? The strategy runs the logic onBar() (1minute data). 

After the position has been closed. The strategy again tries to close the position, even though the position already has been closed. Trading_bad_volume error is due to size being 0 since the position already has been closed. 

Any thoughts would be much appreciated. 

Thanks