Statistiche di slippage degli ordini limite sulla borsa - pagina 3

 

Inizia a fare un conto demo mt5 con bx. Riceverai un'e-mail con un link alla distribuzione. Nella fase di selezione del server si sceglie non un server demo, ma per il trading reale. Creare un account con dati arbitrari. Creare un certificato. Tutti voi avete un conto reale con saldo zero con quotazioni e storia reali.

 
pivomoe:

Inizia a fare un conto demo mt5 con bx. Riceverai un'e-mail con un link alla distribuzione. Nella fase di selezione del server si sceglie non un server demo, ma per il trading reale. Creare un account con dati arbitrari. Creare un certificato. Tutti voi avete un conto reale con saldo zero con quotazioni e storia reali.

Fico - ha funzionato, grazie! Cielo e terra - dati di tick di demo e reale. Grazie ancora!
 
fxsaber:

Nella modalità "basata sui tick reali" lo slippage positivo degli ordini limite è circa il 50% più alto che nella modalità "basata sui tick generati".

Questo si traduce in un contrattempo - abbiamo introdotto i tick reali per aumentare la precisione del tester, ma abbiamo introdotto uno slippage positivo degli ordini limite, che si libra artificialmente sui risultati del backtest.

In borsa, gli ordini limite non scivolano, ma vengono eseguiti esattamente al prezzo dell'ordine. Ma questo non è il caso del tester.

Questo bug può essere evitato usando la libreria descritta nel link qui sopra. Ma questa è una soluzione da stampella. Ha senso quando il tester stesso funziona accuratamente.

Sto chiedendo ai membri del forum le loro opinioni su questo argomento. Dal momento che, per ovvie ragioni, l'opinione di un membro della comunità è scarsamente presa sul serio dagli sviluppatori.

È un peccato che nessuno abbia parlato.
 
fxsaber:
È un peccato che nessuno abbia avuto voce in capitolo.

Questo argomento è già stato discusso qui sul forum da qualche parte e gli stessi sviluppatori sembrano aver detto che lo sistemeranno nelle nuove build. Provate a cercarlo, io non ci ho capito molto...

P.s. Ecco un argomento che era anche senza risposta https://www.mql5.com/ru/forum/86591/page4.

В билде 1340 MT5 очень странное исполнение отложенных ордеров на FOREX в тестере стратегий
В билде 1340 MT5 очень странное исполнение отложенных ордеров на FOREX в тестере стратегий
  • recensioni: 1
  • www.mql5.com
Если тестировать на «OHLC на M1», то ВСЕ ордера исполняются с проскальзыванием в 30-50 пятизначных пунктов...
 
Maxim Dmitrievsky:

Questo argomento è già stato discusso qui sul forum da qualche parte e gli stessi sviluppatori sembrano aver detto che lo sistemeranno nelle nuove build. Provate a cercarlo, io non ci ho capito molto...

P.s. Ecco un argomento, anch'esso senza risposta https://www.mql5.com/ru/forum/86591/page4

Non l'hanno aggiustato.
 
fxsaber:
È un peccato che nessuno abbia parlato.

Perché non avete alcuna base di prova.

È molto più facile salvare il rapporto e zipparlo. Mostratemi un esempio di una transazione con i calcoli.

 
Renat Fatkhullin:

Perché non avete alcuna base di prova.

È molto più facile salvare il rapporto e zipparlo. Mostra un esempio di una singola transazione con una dichiarazione.

Ho pensato che sarebbe stato sufficientehttps://www.mql5.com/ru/code/16134.

Capito, lo preparo.

SlipPage
SlipPage
  • voti: 10
  • 2016.08.25
  • fxsaber
  • www.mql5.com
Расчет проскальзываний совершенных сделок в валюте счета.
 

Consulente

#define OP_BUY ORDER_TYPE_BUY
#define OP_SELL ORDER_TYPE_SELL
#define OP_BUYLIMIT ORDER_TYPE_BUY_LIMIT
#define OP_SELLLIMIT ORDER_TYPE_SELL_LIMIT

// Кусок из https://www.mql5.com/ru/code/16006
class MT4ORDERS
{  
public:   
  static int MT4OrderSend( const string Symb, const int Type, const double dVolume, const double Price, const int SlipPage, const double SL, const double TP,
                            const string comment = NULL, const int magic = 0, const datetime dExpiration = 0, color arrow_color = clrNONE )
  {
    MqlTradeRequest Request = {0};

    Request.action = (((Type == OP_BUY) || (Type == OP_SELL)) ? TRADE_ACTION_DEAL : TRADE_ACTION_PENDING);
    Request.magic = magic;

    Request.symbol = ((Symb == NULL) ? ::Symbol() : Symb);
    Request.volume = dVolume;
    Request.price = Price;

    Request.tp = TP;
    Request.sl = SL;
    Request.deviation = SlipPage;
    Request.type = (ENUM_ORDER_TYPE)Type;

    Request.type_filling = ORDER_FILLING_RETURN;

    if (dExpiration > 0)
    {
      Request.type_time = ORDER_TIME_SPECIFIED;
      Request.expiration = dExpiration;
    }

    Request.comment = comment;

    MqlTradeResult Result;

    return(::OrderSend(Request, Result) ? ((Request.action == TRADE_ACTION_DEAL) ? (int)Result.deal : (int)Result.order) : -1);
  }

  // Такая перегрузка позволяет использоваться совместно и MT5-вариант OrderSend
  static bool MT4OrderSend( const MqlTradeRequest &Request, MqlTradeResult &Result )
  {
    return(::OrderSend(Request, Result));
  }
};

// Обязательно ПОСЛЕ #include <Trade/Trade.mqh>: CTrade::OrderSend
#define OrderSend MT4ORDERS::MT4OrderSend

void OnTick( void )
{
  static int TicketBuyLimit = 0;
  static int TicketSellLimit = 0;
  
  const datetime time = TimeCurrent();
  
  if ((time == D'2016.08.11 19:12:33') && (TicketBuyLimit == 0))
    TicketBuyLimit = OrderSend(Symbol(), OP_BUYLIMIT, 1, 95090, 0, 0, 0);
  else if ((time == D'2016.08.16 18:44:02') && (TicketSellLimit == 0))
    TicketSellLimit = OrderSend(Symbol(), OP_SELLLIMIT, 1, 97070, 0, 0, 0);

  return;
}

Registro dei tester

MR      0       16:47:50.960    Tester  RTS-9.16: ticks data begins from 2016.08.01 00:00
LE      0       16:47:50.963    Core 1  agent process started
CE      0       16:47:51.473    Core 1  connecting to 127.0.0.1:3000
NR      0       16:47:52.736    Core 1  connected
DJ      0       16:47:52.741    Core 1  authorized (agent build 1401)
RR      0       16:47:52.743    Tester  RTS-9.16,M1 (BCS-MetaTrader5): testing of Experts\LimitsFill.ex5 from 2016.08.11 00:00 to 2016.08.17 00:00
GP      0       16:47:52.763    Core 1  common synchronization completed
DI      0       16:47:52.780    Core 1  RTS-9.16: ticks synchronized already [47 bytes]
IL      0       16:47:53.493    Core 1  1482 bytes of tester parameters loaded
PH      0       16:47:53.493    Core 1  188 bytes of input parameters loaded
OR      0       16:47:53.493    Core 1  8562 bytes of symbols list loaded
MI      0       16:47:53.493    Core 1  expert file added: Experts\LimitsFill.ex5. 8164 bytes loaded
FR      0       16:47:53.493    Core 1  initial deposit 100000.00 RUR, leverage 1:0
EI      0       16:47:53.493    Core 1  successfully initialized
IS      0       16:47:53.493    Core 1  35 Kb of total initialization data received
QJ      0       16:47:53.493    Core 1  Intel Core i7-2700 K  @ 3.50 GHz, 16301 MB
LR      0       16:47:53.493    Core 1  RTS-9.16: symbol to be synchronized
PF      0       16:47:53.493    Core 1  RTS-9.16: symbol synchronized, 3224 bytes of symbol info received
RJ      0       16:47:53.493    Core 1  RTS-9.16: load 31 bytes of history data to synchronize in 0:00:00.000
PM      0       16:47:53.493    Core 1  RTS-9.16: history synchronized from 2015.06.22 to 2016.09.01
IS      0       16:47:53.493    Core 1  RTS-9.16: ticks synchronization started
JD      0       16:47:53.493    Core 1  RTS-9.16: load 38 bytes of tick data to synchronize in 0:00:00.000
NO      0       16:47:53.493    Core 1  RTS-9.16: history ticks synchronized from 2016.08.01 to 2016.09.01
RI      0       16:47:53.493    Core 1  RTS-9.16,M1: history cache allocated for 610971 bars and contains 43890 bars from 2015.06.22 10:02 to 2016.08.10 23:49
CM      0       16:47:53.493    Core 1  RTS-9.16,M1: history begins from 2015.06.22 10:02
DD      0       16:47:53.493    Core 1  RTS-9.16,M1 (BCS-MetaTrader5): generating based on real ticks
ML      0       16:47:53.493    Core 1  RTS-9.16,M1: testing of Experts\LimitsFill.ex5 from 2016.08.11 00:00 to 2016.08.17 00:00 started
LQ      3       16:47:53.493    Core 1  RTS-9.16 : real ticks begin from 2016.08.01 00:00:00
GK      0       16:47:53.493    Core 1  2016.08.11 19:12:33   buy limit 1.00 RTS-9.16 at 95090 (95260 / 95270 / 95270)
EK      0       16:47:53.493    Core 1  2016.08.11 19:40:17   order [#2  buy limit 1.00 RTS-9.16 at 95090] triggered
GJ      0       16:47:53.493    Core 1  2016.08.11 19:40:17   deal #2  buy 1.00 RTS-9.16 at 95050 done (based on order #2)
 GR      0       16:47:53.493    Core 1  2016.08.11 19:40:17   deal performed [#2  buy 1.00 RTS-9.16 at 95050]
GP      0       16:47:53.493    Core 1  2016.08.11 19:40:17   order performed buy 1.00 at 95050 [#2  buy limit 1.00 RTS-9.16 at 95090]
QR      0       16:47:53.493    Core 1  2016.08.16 18:44:02   sell limit 1.00 RTS-9.16 at 97070 (97020 / 97030 / 97020)
GF      0       16:47:53.493    Core 1  2016.08.16 19:00:00   order [#3  sell limit 1.00 RTS-9.16 at 97070] triggered
CG      0       16:47:53.493    Core 1  2016.08.16 19:00:00   deal #3  sell 1.00 RTS-9.16 at 97170 done (based on order #3)
 FJ      0       16:47:53.493    Core 1  2016.08.16 19:00:00   deal performed [#3  sell 1.00 RTS-9.16 at 97170]
DO      0       16:47:53.493    Core 1  2016.08.16 19:00:00   order performed sell 1.00 at 97170 [#3  sell limit 1.00 RTS-9.16 at 97070]
KR      0       16:47:53.493    Core 1  final balance 102788.71 RUR
IF      0       16:47:53.493    Core 1  RTS-9.16,M1: 1122105 ticks, 3240 bars generated. Test passed in 0:00:00.717 (including ticks preprocessing 0:00:00.124).
JE      0       16:47:53.493    Core 1  252 Mb memory used including 35 Mb of history data, 64 Mb of tick data
KK      0       16:47:53.493    Core 1  log file "C:\Program Files\BCS Broker MetaTrader 5 Terminal\Tester\Agent-127.0.0.1-3000\logs\20160902.log" written
DJ      0       16:47:53.507    Core 1  connection closed

Lo slittamento degli ordini limite è segnato in grassetto. Lo slippage nel tester è il più alto quando un ordine Limit scivola nella sessione - all'apertura. Ma non ho preso questi casi come esempio. Ho preso il solito mercato.

È riproducibile?

Sfortunatamente, il debug non funziona, quindi non è stato conveniente creare un esempio

Forum sul trading, sistemi di trading automatico e test di strategia

Bug, bug, domande

fxsaber, 2016.09.01 20:18

Impossibile su RTS-9.16 BCS-MetaTrader5 fare il debug dell'EA con CTRL+F5. Il tester scrive
Tester  Leverage 1:1 set error


 
Ho lo stesso problema. Scivola sia sulle azioni che sui futures.
 
fxsaber:

Consulente

Registro dei tester

Lo slittamento degli ordini limite è segnato in grassetto. Lo slippage nel tester è il più alto quando un ordine Limit scivola nella sessione - all'apertura. Ma non ho preso questi casi come esempio. Ho preso il solito mercato.

È riproducibile?

Purtroppo il debug non funziona, quindi non è stato conveniente creare un esempio


Provatelo non nel tester, ma nella demo (apertura migliore, ha una velocità maggiore).