Weird ticket changes to one transaction

 

Hi guys!

I'm testing/developing an EA and today was my first time using it live, but demo account yet.

Analyzing logs, I found a odd situation and I'm not sure if this is normal or an error:


2018.10.22 09:08:19.257 Experts expert MinhaEstrategia2 (WINZ18,M1) loaded successfully
2018.10.22 09:08:21.454 Trades  '123456': buy stop 10.00 WINZ18 at 85840 sl: 85745
2018.10.22 09:08:21.493 Trades  '123456': accepted buy stop 10.00 WINZ18 at 85840 sl: 85745
2018.10.22 09:08:21.493 Trades  '123456': order #109585829 buy stop 10.00 / 10.00 WINZ18 at market done in 39.020 ms
2018.10.22 09:08:51.361 Trades  '123456': cancel order #109585829 buy stop 10.00 WINZ18 at 85840 sl: 85745
2018.10.22 09:08:51.398 Trades  '123456': accepted cancel order #109585829 buy stop 10.00 WINZ18 at 85840 sl: 85745
2018.10.22 09:08:51.400 Trades  '123456': cancel #109585829 buy stop 10.00 WINZ18 at market done in 39.060 ms
2018.10.22 10:18:02.620 Trades  '123456': buy stop 10.00 WINZ18 at 86185 sl: 86090
2018.10.22 10:18:04.543 Trades  '123456': accepted buy stop 10.00 WINZ18 at 86185 sl: 86090
2018.10.22 10:18:04.789 Trades  '123456': order #109629895 buy stop 10.00 / 10.00 WINZ18 at market done in 2169.694 ms
2018.10.22 10:18:07.907 Trades  '123456': deal #83450978 buy 10.00 WINZ18 at 86185 done (based on order #109629895)
2018.10.22 10:20:00.547 Trades  '123456': modify #109629895 buy 10.00 WINZ18 sl: 86090, tp: 0 -> sl: 86190, tp: 0
2018.10.22 10:21:24.557 Trades  '123456': accepted modify #109629895 buy 10.00 WINZ18 sl: 86090, tp: 0 -> sl: 86190, tp: 0
2018.10.22 10:22:10.623 Trades  '123456': modify #109629895 buy 10.00 WINZ18 -> sl: 86190, tp: 0 done in 130095.237 ms
2018.10.22 10:22:10.757 Trades  '123456': modify #109629895 buy 10.00 WINZ18 sl: 86190, tp: 0 -> sl: 86215, tp: 0
2018.10.22 10:22:10.856 Trades  '123456': accepted modify #109629895 buy 10.00 WINZ18 sl: 86190, tp: 0 -> sl: 86215, tp: 0
2018.10.22 10:22:48.113 Trades  '123456': modify #109629895 buy 10.00 WINZ18 -> sl: 86215, tp: 0 done in 37361.704 ms
2018.10.22 10:22:48.142 Trades  '123456': modify #109629895 buy 10.00 WINZ18 sl: 86215, tp: 0 -> sl: 86285, tp: 0
2018.10.22 10:22:48.244 Trades  '123456': accepted modify #109629895 buy 10.00 WINZ18 sl: 86215, tp: 0 -> sl: 86285, tp: 0
2018.10.22 10:23:34.806 Trades  '123456': modify #109629895 buy 10.00 WINZ18 -> sl: 86285, tp: 0 done in 46670.615 ms
2018.10.22 10:23:35.415 Trades  '123456': modify #109629895 buy 10.00 WINZ18 sl: 86285, tp: 0 -> sl: 86290, tp: 0
2018.10.22 10:23:35.491 Trades  '123456': accepted modify #109629895 buy 10.00 WINZ18 sl: 86285, tp: 0 -> sl: 86290, tp: 0
2018.10.22 10:24:29.751 Trades  '123456': modify #109629895 buy 10.00 WINZ18 -> sl: 86290, tp: 0 done in 54343.378 ms
2018.10.22 10:24:30.399 Trades  '123456': deal #83453046 sell 10.00 WINZ18 at 86285 done (based on order #109632261)

The first ticket (#109585829) was cancelled. Ok.

The second one (#109585829) was accepted and modified a few times.


But, at 10:24:30.399 (last line), the price reaches my TP and the sell occured. But the ticket (#83453046) is different!


There's no reference to ticket (#83453046) in my log. Nor the #109632261, which the that first was based on.


Questions:

1. Any clue to what happend here? My code expect to see a OnTrade event to ticket #109629895, which didn't happend.

2. What "Based on order #109632261 means?


Thank you!

 
Flávio Henrique:

Hi guys!

I'm testing/developing an EA and today was my first time using it live, but demo account yet.

Analyzing logs, I found a odd situation and I'm not sure if this is normal or an error:



The first ticket (#109585829) was cancelled. Ok.

The second one (#109585829) was accepted and modified a few times.


But, at 10:24:30.399 (last line), the price reaches my TP and the sell occured. But the ticket (#83453046) is different!

You don't have a TP, your SL was triggered.

#83453046 is a DEAL ticket. It's normal.

There's no reference to ticket (#83453046) in my log. Nor the #109632261, which the that first was based on.

#109632261  is the broker side SL order triggered.

Questions:

1. Any clue to what happend here? My code expect to see a OnTrade event to ticket #109629895, which didn't happend.

2. What "Based on order #109632261 means?

You should read this article.

 
Hi Alain! Thank you! 
 The SL/TP thing was my mistake. In my logic, my TP will be the modified SL. Sorry the fuzz. 

I'll read the article. 
Reason: