[Possible Bug] OnPendingOrdersFilled

Created at 11 Jul 2018, 04:23
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!
JU

julioc1010

Joined 27.11.2016

[Possible Bug] OnPendingOrdersFilled
11 Jul 2018, 04:23


Hi.

I think I found a bug. I used   PlaceStopOrder   and set TP and Target Price. When the event    OnPendingOrdersFilled   fires, the args.Position has INCORRECT values comparing with   args.PendingOrders.  

args.PendingOrders = Pending Order that was filled.

args.Position = Position that was filled from Pending Order.

 

That is a BUG? Take a look at the Print below. TakeProfit never would be different once I set on PlaceStopOrder before.

 


@julioc1010
Replies

ap11
12 Jul 2018, 16:03

Hi Julioc1010,

Pending order Take Profit is set in pips. And in your case, it is equal to 200 pips.

Probably order was executed at 0.9849 and Take Profit was placed at 0.9649 - 200 pips away from the entry price.

Please check if it is the case.

P.S.
If you don't want your order to be executed on gaps, away from target price, you can use StopLimit orders.

Regards,
Andrey

 


@ap11

julioc1010
13 Jul 2018, 01:21

RE:

Hi Andrey,

Thank you for your advice. Using StopLimit solved my problem. Sorry for my mistake between StopOrder and StopLimit.

 

Regards,

Julio

 

 

Andrey Pisarev said:

Hi Julioc1010,

Pending order Take Profit is set in pips. And in your case, it is equal to 200 pips.

Probably order was executed at 0.9849 and Take Profit was placed at 0.9649 - 200 pips away from the entry price.

Please check if it is the case.

P.S.
If you don't want your order to be executed on gaps, away from target price, you can use StopLimit orders.

Regards,
Andrey

 

 


@julioc1010