Servicedesk. Complaints, suggestions. - page 10

 

Yes, usually there is one such transaction per trade (whether an order is triggered or a position is closed). But, here I saw two.

Again, the transactions could not have been queued up, as the trade is not high-frequency.

 

Just in case, a piece with a previous trade(closing a position) + deletion of two orders:

CS      0       16:41:05.798    Trade   2015.10.01 13:05:00   exchange sell 1.00 RTS-12.15 at 79190 (79190 / 79230 / 79190)
PR      0       16:41:05.798    Trades  2015.10.01 13:05:00   deal #9  sell 1.00 RTS-12.15 at 79190 done (based on order #14)
 JI      0       16:41:05.798    Trade   2015.10.01 13:05:00   deal performed [#9  sell 1.00 RTS-12.15 at 79190]
LE      0       16:41:05.798    Trade   2015.10.01 13:05:00   order performed sell 1.00 at 79190 [#14  sell 1.00 RTS-12.15 at 79190]
RD      0       16:41:05.798    Trade   2015.10.01 13:05:00   order canceled [#13  sell stop 1.00 RTS-12.15 at 79100]
QR      0       16:41:05.798    Trade   2015.10.01 13:05:00   order canceled [#12  sell limit 1.00 RTS-12.15 at 79500]
GL      0       16:41:05.798    Expert_0311 (RTS-12.15,M5)      2015.10.01 13:05:00   OnTradeTransaction: TRADE_TRANSACTION_DEAL_ADD
LO      0       16:41:14.001    Trade   2015.10.01 13:20:00   sell limit 1.00 RTS-12.15 at 79210 (79200 / 79300 / 79200)
EI      0       16:41:14.001    Trade   2015.10.01 13:20:00   order [#15  sell limit 1.00 RTS-12.15 at 79210] triggered
IJ      0       16:41:14.001    Trades  2015.10.01 13:20:00   deal #10  sell 1.00 RTS-12.15 at 79210 done (based on order #15)
 OK      0       16:41:14.001    Trade   2015.10.01 13:20:00   deal performed [#10  sell 1.00 RTS-12.15 at 79210]
RM      0       16:41:14.001    Trade   2015.10.01 13:20:00   order performed sell 1.00 at 79210 [#15  sell limit 1.00 RTS-12.15 at 79210]
HP      0       16:41:19.248    Expert_0311 (RTS-12.15,M5)      2015.10.01 13:20:00   OnTradeTransaction: TRADE_TRANSACTION_DEAL_ADD
DO      0       16:41:19.248    Trade   2015.10.01 13:20:00   buy limit 1.00 RTS-12.15 at 79010 (79200 / 79300 / 79200)
MS      0       16:41:19.248    Trade   2015.10.01 13:20:00   buy stop 1.00 RTS-12.15 at 79410 (79200 / 79300 / 79200)
PK      0       16:41:19.248    Expert_0311 (RTS-12.15,M5)      2015.10.01 13:20:00   OnTradeTransaction: TRADE_TRANSACTION_DEAL_ADD
LG      0       16:41:19.248    Trade   2015.10.01 13:20:00   buy limit 1.00 RTS-12.15 at 79010 (79200 / 79300 / 79200)
EK      0       16:41:19.248    Trade   2015.10.01 13:20:00   buy stop 1.00 RTS-12.15 at 79410 (79200 / 79300 / 79200)
 

You have an error in logic.

1. Stop orders should not be opened when a transaction arrives, but when an order is placed. That is, the required position has appeared in the position list.

2. When placing a stop order, we should first make sure that there are no stop orders at all.

I have not yet understood why two identical (are they the same?) transactions appear. We have to look at all the parameters of incoming transactions, not only their type.

Let us give us your code example - opening of a position and OnTradeTransaction. This will help us sort things out faster

 
Slawa:

You have an error in logic.

1. Stop orders should not be opened when a transaction arrives, but when an order is placed. That is, the required position has appeared in the position list.

2. When placing a stop order, we should first make sure that there are no stop orders at all.

I have not yet understood why two identical (are they the same?) transactions appear. We have to look at all the parameters of incoming transactions, not only their type.

Let us give us your code example - opening of a position and OnTradeTransaction. This will help us sort things out faster

1. If stop orders are opened upon position opening, the stop order may trigger first, and not the "main" one.

2. Yes, that is my problem, that is how I will solve it, if what I have described is not an error.

This will be a long example. Let me send you an EA in SD.

Application#1348574

 
Alexey Kozitsyn:

1. If stop orders are opened when an order is placed, it may not be the "main" order that is triggered first, but the stop order.


How is this possible?

Do you trade from OnTradeTransaction by chance?

2. Yes, this is my problem, this is how I will solve it, if what I have described is not an error.

This will be a long example. Let me send you an EA in SD.


What is the long example for?

Opening of position

OnTradeTransaction

Place stops

Request#1348574

Ok

 
Slawa:

How's that?

And you do not perform trade operations from OnTradeTransaction by any chance?

Why the long example?

Position opening

OnTradeTransaction

Setting stops

Ok

Yes, from there? Any restrictions?

More. In OHLC M1 simulation mode - everything is OK.

 
Alexey Kozitsyn:

Yes, from there? Are there restrictions?


The limitations are purely event-based

You run the risk of not getting out of OnTradeTransaction processing for a very long time - just processed, and the next transaction you just spawned is coming up

 

Try instead of a simple print

         Print(__FUNCTION__,": TRADE_TRANSACTION_DEAL_ADD);

Make this print

         Print ( __FUNCTION__ , ": TRADE_TRANSACTION_DEAL_ADD  deal " ,trans.deal, "  order " ,trans.order, "  order type " , EnumToString (trans.order_type), "  deal type " , EnumToString (trans.deal_type), "  price " ,trans.price);

And look.

For me, for example, judging by the prints, there is no doubling of events

 2015.11 . 13 16 : 36 : 45.794 Trade   2015.10 . 01 12 : 00 : 00    buy limit 1.00 RTS- 12.15 at 78850 ( 79280 / 79340 / 79280 )
2015.11 . 13 16 : 36 : 45.852 Trade   2015.10 . 01 14 : 27 : 00    order [ # 2 buy limit 1.00 RTS- 12.15 at 78850 ] triggered
2015.11 . 13 16 : 36 : 45.852 Trades   2015.10 . 01 14 : 27 : 00    deal # 2 buy 1.00 RTS- 12.15 at 78850 done (based on order # 2 )
2015.11 . 13 16 : 36 : 45.852 Trade   2015.10 . 01 14 : 27 : 00    deal performed [ # 2 buy 1.00 RTS- 12.15 at 78850 ]
2015.11 . 13 16 : 36 : 45.852 Trade   2015.10 . 01 14 : 27 : 00    order performed buy 1.00 at 78850 [ # 2 buy limit 1.00 RTS- 12.15 at 78850 ]
2015.11 . 13 16 : 36 : 45.854 Expert_0311 (RTS- 12.15 ,H1)       2015.10 . 01 14 : 27 : 00    OnTradeTransaction : TRADE_TRANSACTION_DEAL_ADD   deal 2   order 2   order type ORDER_TYPE_BUY   deal type DEAL_TYPE_BUY   price 78850.0
2015.11 . 13 16 : 36 : 45.854 Trade   2015.10 . 01 14 : 27 : 00    sell limit 1.00 RTS- 12.15 at 79100 ( 78660 / 78830 / 78660 )
2015.11 . 13 16 : 36 : 45.854 Trade   2015.10 . 01 14 : 27 : 00    sell stop 1.00 RTS- 12.15 at 78600 ( 78660 / 78830 / 78660 )
2015.11 . 13 16 : 36 : 45.858 Trade   2015.10 . 01 14 : 30 : 29    order [ # 4 sell stop 1.00 RTS- 12.15 at 78600 ] triggered
2015.11 . 13 16 : 36 : 45.858 Trades   2015.10 . 01 14 : 30 : 29    deal # 3 sell 1.00 RTS- 12.15 at 78600 done (based on order # 4 )
2015.11 . 13 16 : 36 : 45.858 Trade   2015.10 . 01 14 : 30 : 29    deal performed [ # 3 sell 1.00 RTS- 12.15 at 78600 ]
2015.11 . 13 16 : 36 : 45.858 Trade   2015.10 . 01 14 : 30 : 29    order performed sell 1.00 at 78600 [ # 4 sell stop 1.00 RTS- 12.15 at 78600 ]
2015.11 . 13 16 : 36 : 45.858 Expert_0311 (RTS- 12.15 ,H1)       2015.10 . 01 14 : 30 : 29    OnTradeTransaction : TRADE_TRANSACTION_DEAL_ADD   deal 3   order 4   order type ORDER_TYPE_BUY   deal type DEAL_TYPE_SELL   price 78600.0
2015.11 . 13 16 : 36 : 45.858 Trade   2015.10 . 01 14 : 30 : 29    order canceled [ # 3 sell limit 1.00 RTS- 12.15 at 79100 ]
2015.11 . 13 16 : 36 : 45.954 Trade   2015.10 . 01 17 : 00 : 00    sell limit 1.00 RTS- 12.15 at 78570 ( 78240 / 78390 / 78240 )
2015.11 . 13 16 : 36 : 45.976 Trade   2015.10 . 01 17 : 28 : 32    order [ # 5 sell limit 1.00 RTS- 12.15 at 78570 ] triggered
2015.11 . 13 16 : 36 : 45.976 Trades   2015.10 . 01 17 : 28 : 32    deal # 4 sell 1.00 RTS- 12.15 at 78570 done (based on order # 5 )
2015.11 . 13 16 : 36 : 45.976 Trade   2015.10 . 01 17 : 28 : 32    deal performed [ # 4 sell 1.00 RTS- 12.15 at 78570 ]
2015.11 . 13 16 : 36 : 45.976 Trade   2015.10 . 01 17 : 28 : 32    order performed sell 1.00 at 78570 [ # 5 sell limit 1.00 RTS- 12.15 at 78570 ]
2015.11 . 13 16 : 36 : 45.976 Expert_0311 (RTS- 12.15 ,H1)       2015.10 . 01 17 : 28 : 32    OnTradeTransaction : TRADE_TRANSACTION_DEAL_ADD   deal 4   order 5   order type ORDER_TYPE_BUY   deal type DEAL_TYPE_SELL   price 78570.0
2015.11 . 13 16 : 36 : 45.976 Trade   2015.10 . 01 17 : 28 : 32    buy limit 1.00 RTS- 12.15 at 78320 ( 78560 / 78650 / 78560 )
2015.11 . 13 16 : 36 : 45.976 Trade   2015.10 . 01 17 : 28 : 32    buy stop 1.00 RTS- 12.15 at 78820 ( 78560 / 78650 / 78560 )
2015.11 . 13 16 : 36 : 45.990 Trade   2015.10 . 01 17 : 43 : 43    order [ # 6 buy limit 1.00 RTS- 12.15 at 78320 ] triggered
2015.11 . 13 16 : 36 : 45.990 Trades   2015.10 . 01 17 : 43 : 43    deal # 5 buy 1.00 RTS- 12.15 at 78320 done (based on order # 6 )
2015.11 . 13 16 : 36 : 45.990 Trade   2015.10 . 01 17 : 43 : 43    deal performed [ # 5 buy 1.00 RTS- 12.15 at 78320 ]
2015.11 . 13 16 : 36 : 45.990 Trade   2015.10 . 01 17 : 43 : 43    order performed buy 1.00 at 78320 [ # 6 buy limit 1.00 RTS- 12.15 at 78320 ]
2015.11 . 13 16 : 36 : 45.990 Expert_0311 (RTS- 12.15 ,H1)       2015.10 . 01 17 : 43 : 43    OnTradeTransaction : TRADE_TRANSACTION_DEAL_ADD   deal 5   order 6   order type ORDER_TYPE_BUY   deal type DEAL_TYPE_BUY   price 78320.0
2015.11 . 13 16 : 36 : 45.990 Trade   2015.10 . 01 17 : 43 : 43    order canceled [ # 7 buy stop 1.00 RTS- 12.15 at 78820 ]
2015.11 . 13 16 : 36 : 46.046 Trade   2015.10 . 01 19 : 00 : 00    sell limit 1.00 RTS- 12.15 at 78220 ( 77910 / 78060 / 77910 )
2015.11 . 13 16 : 36 : 46.332 Trade   order expired [ # 8 sell limit 1.00 RTS- 12.15 at 78220 ]
2015.11 . 13 16 : 36 : 46.375 Trade   2015.10 . 02 17 : 00 : 00    sell limit 1.00 RTS- 12.15 at 76540 ( 76020 / 76100 / 76020 )
2015.11 . 13 16 : 36 : 46.437 Trade   2015.10 . 02 19 : 15 : 28    order [ # 9 sell limit 1.00 RTS- 12.15 at 76540 ] triggered
2015.11 . 13 16 : 36 : 46.437 Trades   2015.10 . 02 19 : 15 : 28    deal # 6 sell 1.00 RTS- 12.15 at 76540 done (based on order # 9 )
2015.11 . 13 16 : 36 : 46.437 Trade   2015.10 . 02 19 : 15 : 28    deal performed [ # 6 sell 1.00 RTS- 12.15 at 76540 ]
2015.11 . 13 16 : 36 : 46.437 Trade   2015.10 . 02 19 : 15 : 28    order performed sell 1.00 at 76540 [ # 9 sell limit 1.00 RTS- 12.15 at 76540 ]
2015.11 . 13 16 : 36 : 46.437 Expert_0311 (RTS- 12.15 ,H1)       2015.10 . 02 19 : 15 : 28    OnTradeTransaction : TRADE_TRANSACTION_DEAL_ADD   deal 6   order 9   order type ORDER_TYPE_BUY   deal type DEAL_TYPE_SELL   price 76540.0
2015.11 . 13 16 : 36 : 46.437 Trade   2015.10 . 02 19 : 15 : 28    buy limit 1.00 RTS- 12.15 at 76290 ( 76540 / 76630 / 76540 )
2015.11 . 13 16 : 36 : 46.437 Trade   2015.10 . 02 19 : 15 : 28    buy stop 1.00 RTS- 12.15 at 76790 ( 76540 / 76630 / 76540 )
2015.11 . 13 16 : 36 : 46.443 Trade   2015.10 . 02 19 : 19 : 15    order [ # 11 buy stop 1.00 RTS- 12.15 at 76790 ] triggered
2015.11 . 13 16 : 36 : 46.443 Trades   2015.10 . 02 19 : 19 : 15    deal # 7 buy 1.00 RTS- 12.15 at 76790 done (based on order # 11 )
2015.11 . 13 16 : 36 : 46.443 Trade   2015.10 . 02 19 : 19 : 15    deal performed [ # 7 buy 1.00 RTS- 12.15 at 76790 ]
2015.11 . 13 16 : 36 : 46.443 Trade   2015.10 . 02 19 : 19 : 15    order performed buy 1.00 at 76790 [ # 11 buy stop 1.00 RTS- 12.15 at 76790 ]
2015.11 . 13 16 : 36 : 46.443 Expert_0311 (RTS- 12.15 ,H1)       2015.10 . 02 19 : 19 : 15    OnTradeTransaction : TRADE_TRANSACTION_DEAL_ADD   deal 7   order 11   order type ORDER_TYPE_BUY   deal type DEAL_TYPE_BUY   price 76790.0
2015.11 . 13 16 : 36 : 46.443 Trade   2015.10 . 02 19 : 19 : 15    order canceled [ # 10 buy limit 1.00 RTS- 12.15 at 76290 ]
2015.11 . 13 16 : 36 : 46.507 Trade   2015.10 . 02 22 : 00 : 00    sell limit 1.00 RTS- 12.15 at 77540 ( 76940 / 76990 / 76940 )
2015.11 . 13 16 : 36 : 46.520 Trade   2015.10 . 02 22 : 47 : 32    order [ # 12 sell limit 1.00 RTS- 12.15 at 77540 ] triggered
2015.11 . 13 16 : 36 : 46.520 Trades   2015.10 . 02 22 : 47 : 32    deal # 8 sell 1.00 RTS- 12.15 at 77540 done (based on order # 12 )
2015.11 . 13 16 : 36 : 46.520 Trade   2015.10 . 02 22 : 47 : 32    deal performed [ # 8 sell 1.00 RTS- 12.15 at 77540 ]
2015.11 . 13 16 : 36 : 46.520 Trade   2015.10 . 02 22 : 47 : 32    order performed sell 1.00 at 77540 [ # 12 sell limit 1.00 RTS- 12.15 at 77540 ]
2015.11 . 13 16 : 36 : 46.520 Expert_0311 (RTS- 12.15 ,H1)       2015.10 . 02 22 : 47 : 32    OnTradeTransaction : TRADE_TRANSACTION_DEAL_ADD   deal 8   order 12   order type ORDER_TYPE_BUY   deal type DEAL_TYPE_SELL   price 77540.0
2015.11 . 13 16 : 36 : 46.520 Trade   2015.10 . 02 22 : 47 : 32    buy limit 1.00 RTS- 12.15 at 77290 ( 77550 / 77600 / 77550 )
2015.11 . 13 16 : 36 : 46.520 Trade   2015.10 . 02 22 : 47 : 32    buy stop 1.00 RTS- 12.15 at 77790 ( 77550 / 77600 / 77550 )
2015.11 . 13 16 : 36 : 46.525 Trade   2015.10 . 02 23 : 00 : 00    exchange buy 1.00 RTS- 12.15 at 77660 ( 77610 / 77660 / 77610 )
2015.11 . 13 16 : 36 : 46.525 Trades   2015.10 . 02 23 : 00 : 00    deal # 9 buy 1.00 RTS- 12.15 at 77660 done (based on order # 15 )
2015.11 . 13 16 : 36 : 46.525 Trade   2015.10 . 02 23 : 00 : 00    deal performed [ # 9 buy 1.00 RTS- 12.15 at 77660 ]
2015.11 . 13 16 : 36 : 46.525 Trade   2015.10 . 02 23 : 00 : 00    order performed buy 1.00 at 77660 [ # 15 buy 1.00 RTS- 12.15 at 77660 ]
2015.11 . 13 16 : 36 : 46.525 Trade   2015.10 . 02 23 : 00 : 00    order canceled [ # 14 buy stop 1.00 RTS- 12.15 at 77790 ]
2015.11 . 13 16 : 36 : 46.525 Trade   2015.10 . 02 23 : 00 : 00    order canceled [ # 13 buy limit 1.00 RTS- 12.15 at 77290 ]
2015.11 . 13 16 : 36 : 46.525 Expert_0311 (RTS- 12.15 ,H1)       2015.10 . 02 23 : 00 : 00    OnTradeTransaction : TRADE_TRANSACTION_DEAL_ADD   deal 9   order 15   order type ORDER_TYPE_BUY   deal type DEAL_TYPE_BUY   price 77660.0
2015.11 . 13 16 : 36 : 46.532 Tester  final balance 99507.32 RUR
2015.11 . 13 16 : 36 : 46.537 Tester  RTS- 12.15 ,H1: 664125 ticks ( 28 bars) generated in 0 : 00 : 00.907 (total bars in history 507 , total time 0 : 00 : 00.922 )

Here is the log from 15 minutes, like you

 2015.11 . 13 16 : 46 : 28.895 Trade   2015.10 . 01 10 : 30 : 00    buy limit 1.00 RTS- 12.15 at 79400 ( 79550 / 79610 / 79550 )
2015.11 . 13 16 : 46 : 28.909 Trade   2015.10 . 01 11 : 03 : 43    order [ # 2 buy limit 1.00 RTS- 12.15 at 79400 ] triggered
2015.11 . 13 16 : 46 : 28.909 Trades   2015.10 . 01 11 : 03 : 43    deal # 2 buy 1.00 RTS- 12.15 at 79400 done (based on order # 2 )
2015.11 . 13 16 : 46 : 28.909 Trade   2015.10 . 01 11 : 03 : 43    deal performed [ # 2 buy 1.00 RTS- 12.15 at 79400 ]
2015.11 . 13 16 : 46 : 28.909 Trade   2015.10 . 01 11 : 03 : 43    order performed buy 1.00 at 79400 [ # 2 buy limit 1.00 RTS- 12.15 at 79400 ]
2015.11 . 13 16 : 46 : 28.911 Expert_0311 (RTS- 12.15 ,M15)     2015.10 . 01 11 : 03 : 43    OnTradeTransaction : TRADE_TRANSACTION_DEAL_ADD   deal 2   order 2   order type ORDER_TYPE_BUY   deal type DEAL_TYPE_BUY   price 79400.0
2015.11 . 13 16 : 46 : 28.911 Trade   2015.10 . 01 11 : 03 : 43    sell limit 1.00 RTS- 12.15 at 79650 ( 79330 / 79400 / 79330 )
2015.11 . 13 16 : 46 : 28.911 Trade   2015.10 . 01 11 : 03 : 43    sell stop 1.00 RTS- 12.15 at 79150 ( 79330 / 79400 / 79330 )
2015.11 . 13 16 : 46 : 28.916 Trade   2015.10 . 01 11 : 10 : 05    order [ # 4 sell stop 1.00 RTS- 12.15 at 79150 ] triggered
2015.11 . 13 16 : 46 : 28.916 Trades   2015.10 . 01 11 : 10 : 05    deal # 3 sell 1.00 RTS- 12.15 at 79150 done (based on order # 4 )
2015.11 . 13 16 : 46 : 28.916 Trade   2015.10 . 01 11 : 10 : 05    deal performed [ # 3 sell 1.00 RTS- 12.15 at 79150 ]
2015.11 . 13 16 : 46 : 28.916 Trade   2015.10 . 01 11 : 10 : 05    order performed sell 1.00 at 79150 [ # 4 sell stop 1.00 RTS- 12.15 at 79150 ]
2015.11 . 13 16 : 46 : 28.916 Expert_0311 (RTS- 12.15 ,M15)     2015.10 . 01 11 : 10 : 05    OnTradeTransaction : TRADE_TRANSACTION_DEAL_ADD   deal 3   order 4   order type ORDER_TYPE_BUY   deal type DEAL_TYPE_SELL   price 79150.0
2015.11 . 13 16 : 46 : 28.916 Trade   2015.10 . 01 11 : 10 : 05    order canceled [ # 3 sell limit 1.00 RTS- 12.15 at 79650 ]
2015.11 . 13 16 : 46 : 28.947 Trade   2015.10 . 01 12 : 15 : 00    buy limit 1.00 RTS- 12.15 at 78980 ( 79100 / 79160 / 79100 )
2015.11 . 13 16 : 46 : 28.982 Trade   2015.10 . 01 14 : 04 : 00    order canceled [ # 5 buy limit 1.00 RTS- 12.15 at 78980 ]
2015.11 . 13 16 : 46 : 28.986 Trade   2015.10 . 01 14 : 15 : 00    sell limit 1.00 RTS- 12.15 at 79280 ( 79090 / 79170 / 79090 )
2015.11 . 13 16 : 46 : 29.459 Trade   order expired [ # 6 sell limit 1.00 RTS- 12.15 at 79280 ]
2015.11 . 13 16 : 46 : 29.459 Trade   2015.10 . 02 15 : 45 : 00    sell limit 1.00 RTS- 12.15 at 76750 ( 76530 / 76610 / 76530 )
2015.11 . 13 16 : 46 : 29.551 Trade   2015.10 . 02 18 : 00 : 00    order canceled [ # 7 sell limit 1.00 RTS- 12.15 at 76750 ]
2015.11 . 13 16 : 46 : 29.563 Trade   2015.10 . 02 18 : 30 : 00    buy limit 1.00 RTS- 12.15 at 75880 ( 76120 / 76180 / 76120 )
2015.11 . 13 16 : 46 : 29.682 Trade   2015.10 . 02 23 : 59 : 59    order canceled due end of test [ # 8 buy limit 1.00 RTS- 12.15 at 75880 ]
2015.11 . 13 16 : 46 : 29.682 Tester  final balance 99667.10 RUR
2015.11 . 13 16 : 46 : 29.686 Tester  RTS- 12.15 ,M15: 664125 ticks ( 110 bars) generated in 0 : 00 : 00.938 (total bars in history 1917 , total time 0 : 00 : 00.953 )
 
Slawa:

Try instead of a simple print

Make a print like this.

And take a look.

I, for example, judging from the prints, don't have any event doubling.

Here's a log from a 15-minute print like yours.

Tried your option. As I said earlier, the error is "floating". It's not always possible to repeat it. And I have the log from the M5.

From the logs, it looks like an error:

RH      0       22:20:07.605    Trade   2015.10.01 13:20:00   sell limit 1.00 RTS-12.15 at 79210 (79200 / 79300 / 79200)
JM      0       22:20:07.605    Trade   2015.10.01 13:20:00   order [#15  sell limit 1.00 RTS-12.15 at 79210] triggered
HQ      0       22:20:07.605    Trades  2015.10.01 13:20:00   deal #10  sell 1.00 RTS-12.15 at 79210 done (based on order #15)
 IP      0       22:20:07.605    Trade   2015.10.01 13:20:00   deal performed [#10  sell 1.00 RTS-12.15 at 79210]
OD      0       22:20:07.605    Trade   2015.10.01 13:20:00   order performed sell 1.00 at 79210 [#15  sell limit 1.00 RTS-12.15 at 79210]
ND      0       22:20:20.044    Expert_0311 (RTS-12.15,M5)      2015.10.01 13:20:00   OnTradeTransaction: TRADE_TRANSACTION_DEAL_ADD  deal 10  order 15  order type ORDER_TYPE_BUY  deal type DEAL_TYPE_SELL  price 79210
JM      0       22:20:20.044    Trade   2015.10.01 13:20:00   buy limit 1.00 RTS-12.15 at 79010 (79200 / 79300 / 79200)
OR      0       22:20:20.044    Trade   2015.10.01 13:20:00   buy stop 1.00 RTS-12.15 at 79410 (79200 / 79300 / 79200)
PG      0       22:20:20.044    Expert_0311 (RTS-12.15,M5)      2015.10.01 13:20:00   OnTradeTransaction: TRADE_TRANSACTION_DEAL_ADD  deal 10  order 15  order type ORDER_TYPE_BUY  deal type DEAL_TYPE_SELL  price 79210
DH      0       22:20:20.044    Trade   2015.10.01 13:20:00   buy limit 1.00 RTS-12.15 at 79010 (79200 / 79300 / 79200)
QM      0       22:20:20.044    Trade   2015.10.01 13:20:00   buy stop 1.00 RTS-12.15 at 79410 (79200 / 79300 / 79200)

Transactions are clones. Exactly the same. On OHLC M1 - no such thing.

 
And while we're on the subject. Next question. According to the logs, we can see that the order initiating the trade is of sell limit type. But when we get the order type from the OnTradeTransaction() function, we get ORDER_TYPE_BUY. How so? Yes, if we look further, any initiating order in the tester, when processed in OnTradeTransaction, is ORDER_TYPE_BUY. There is definitely an error.