Servicedesk. Reclami, suggerimenti. - pagina 10

 

Sì, di solito c'è una transazione di questo tipo per ogni operazione (sia che venga attivato un ordine sia che venga chiusa una posizione). Ma qui ne ho visti due.

Anche in questo caso, le transazioni non potrebbero essere accodate, poiché il commercio non è ad alta frequenza.

 

Nel caso, un pezzo con un trade precedente(chiusura di una posizione) + cancellazione di due ordini:

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)
 

Lei ha un errore di logica.

1. Gli ordini stop non devono essere aperti quando arriva una transazione, ma quando viene piazzato un ordine. Cioè, la posizione richiesta è apparsa nella lista delle posizioni.

2. Quando piazziamo un ordine di stop, dobbiamo prima assicurarci che non ci siano ordini di stop.

Non ho ancora capito perché appaiono due transazioni identiche (sono le stesse?). Dobbiamo guardare tutti i parametri delle transazioni in entrata, non solo il loro tipo.

Diamo il tuo esempio di codice - apertura di una posizione e OnTradeTransaction. Questo ci aiuterà a risolvere le cose più velocemente

 
Slawa:

Lei ha un errore di logica.

1. Gli ordini stop non devono essere aperti quando arriva una transazione, ma quando viene piazzato un ordine. Cioè, la posizione richiesta è apparsa nella lista delle posizioni.

2. Quando piazziamo un ordine di stop, dobbiamo prima assicurarci che non ci siano ordini di stop.

Non ho ancora capito perché appaiono due transazioni identiche (sono le stesse?). Dobbiamo guardare tutti i parametri delle transazioni in entrata, non solo il loro tipo.

Diamo il tuo esempio di codice - apertura di una posizione e OnTradeTransaction. Questo ci aiuterà a risolvere le cose più velocemente

1. Se gli ordini stop sono aperti all'apertura della posizione, allora non l'ordine "principale", ma l'ordine stop potrebbe scattare per primo.

2. Sì, questo è il mio problema, è così che lo risolverò, se quello che ho descritto non è un errore.

Questo sarà un lungo esempio. Lascia che ti mandi un EA in SD.

Applicazione#1348574

 
Alexey Kozitsyn:

1. Se gli ordini di stop sono aperti quando viene piazzato un ordine, potrebbe non essere l'ordine "principale" ad essere attivato per primo, ma l'ordine di stop.


Come è possibile?

Fai trading da OnTradeTransaction per caso?

2. Sì, questo è il mio problema, ecco come lo risolverò, se quello che ho descritto non è un errore.

Questo sarà un lungo esempio. Lascia che ti mandi un EA in SD.


A cosa serve l'esempio lungo?

Apertura della posizione

OnTradeTransaction

Fermate del posto

Richiesta#1348574

Ok

 
Slawa:

Com'è?

E non eseguite operazioni commerciali da OnTradeTransaction per caso?

Perché questo lungo esempio?

Apertura della posizione

OnTradeTransaction

Fermate di regolazione

Ok

Sì, da lì? Ci sono restrizioni?

Di più. In modalità di simulazione OHLC M1 - tutto è OK.

 
Alexey Kozitsyn:

Sì, da lì? Ci sono restrizioni?


Le limitazioni sono puramente basate sugli eventi

Si corre il rischio di non uscire dall'elaborazione di OnTradeTransaction per un tempo molto lungo - appena elaborato, e la prossima transazione appena generata è in arrivo

 

Prova invece di una semplice stampa

         Print(__FUNCTION__,": TRADE_TRANSACTION_DEAL_ADD);

Fai questa stampa

         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);

E guarda.

Per me, ad esempio, a giudicare dalle stampe, non c'è il raddoppio degli eventi

 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 )

Ecco il log di 15 minuti, come te

 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:

Prova invece di una semplice stampa

Fai una stampa come questa.

E date un'occhiata.

Io, per esempio, a giudicare dalle stampe, non ho nessun raddoppio di eventi.

Ecco un registro di una stampa di 15 minuti come la tua.

Ho provato la tua opzione. Come ho detto prima, l'errore è "fluttuante". Non è sempre possibile ripeterlo. E ho il registro della M5.

Dai log, sembra un errore:

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)

Le transazioni sono cloni. Esattamente lo stesso. Su OHLC M1 - niente del genere.

 
E visto che siamo in tema. Prossima domanda. Secondo i log, possiamo vedere che l'ordine che ha iniziato il trade è di tipo sell limit. Ma quando otteniamo il tipo di ordine dalla funzione OnTradeTransaction(), otteniamo ORDER_TYPE_BUY. Come mai? Sì, se guardiamo oltre, qualsiasi ordine di avvio nel tester, quando viene processato in OnTradeTransaction, è ORDER_TYPE_BUY. C'è sicuramente un errore.
Motivazione: