Testeur de stratégie MetaTrader 5 : bugs, anomalies, suggestions d'amélioration - page 9

 
Vladimir Karputov:

Prenez l'EA standard de la livraison et vérifiez - tout fonctionne. Mais si les paramètres d'entrée sont déclarés comme sinput - alors ces paramètres ne peuvent pas être optimisés.

J'ai choisi parmi les EAs standards :

Exemple de MACD

Mais tout reste inchangé :

Exemple d'entrée MACD

Je n'ai fait qu'un paramètre magique dans mon entrée car il n'y a aucun sens à son optimisation.

entrée et sortie

Ma construction est de 2155. Peut-être qu'il y a un problème avec la construction ?

 
Mihail Matkovskij:

J'ai choisi parmi les experts standard :

Mais tout reste inchangé :

Dans mon propre calcul, je n'ai fait que le paramètre magique, car cela n'a aucun sens de l'optimiser.


Ma construction est de 2155. Peut-être qu'il y a un problème avec la construction ?

Voilà, je l'ai. Je dois mettre des drapeaux devant les paramètres optimisés, auparavant il n'était pas nécessaire de définir des paramètres d'optimisation.

 
Mihail Matkovskij:

J'ai choisi parmi les experts standard :

Mais tout reste inchangé :

Dans mon propre calcul, je n'ai fait que le paramètre magique, car cela n'a aucun sens de l'optimiser.


Ma construction est de 2155. Peut-être qu'il y a un problème avec la construction ?

La construction est bonne, si vous ne faites pas attention. Vous avez pris un EA standard et je vois que ses paramètres sont ACCEPTABLES DE CHANGER. Il vous suffit de cocher les cases de la colonne "Variable".


Ajouté : alors que j'écrivais ma réponse, je vois que vous avez trouvé la solution.

 
Vladimir Karputov:

La construction est bonne, mais vous êtes inattentif. Vous avez pris l'EA standard et je peux voir que ses paramètres sont ACCEPTABLES d'être modifiés. Il vous suffit de cocher les cases de la colonne "Variable".


Ajouté : pendant que j'écrivais une réponse, je vois que vous avez trouvé la solution.

Oui. Mais merci quand même !

 
Lorsque le Testeur compte (bouton rouge Stop), la molette de la souris dans l'onglet Options ne fonctionne pas (il faut faire défiler de nombreux paramètres).
 
Bonjour, une question sur l'optimisation. J'ai 4 agents dans mon terminal. Dans le passé, l'ensemble du système pouvait geler en raison de l'optimisation. Par conséquent, j'ai déconnecté un agent et ensuite tout a fonctionné correctement. Dans la nouvelle version du terminal, j'ai remarqué que le premier agent n'est pas chargé du tout. Alors, j'ai fait appel au quatrième agent. Ai-je raison, dois-je m'attendre à un blocage avec 4 agents en cours d'exécution, ou le premier agent est-il toujours déchargé pendant toute l'optimisation, comme je le supposais ?
 
Mihail Matkovskij:
Bonjour ! Question sur l'optimisation. J'ai 4 agents dans mon terminal. Dans le passé, en raison de l'optimisation, il a pu y avoir des gels du système. Par conséquent, j'ai désactivé un agent et tout a bien fonctionné. Dans la nouvelle version, j'ai remarqué que le premier agent n'est pas chargé du tout. Alors, j'ai fait appel au quatrième agent. Ai-je bien fait, dois-je m'attendre à un blocage avec 4 agents en cours d'exécution, ou le premier agent est-il toujours déchargé pendant toute l'optimisation, comme je le supposais ?

Est-ce que vous avez une fenêtre Visual Tester ouverte sur le premier agent ? Si oui, fermez la fenêtre de Visual Tester et l'agent #1 deviendra libre.

 

Le testeur ne remet pas à zéro les derniers ticks de l'intervalle de test.

EA

#define  TOSTR(A) " " + #A + " = " + (string)Tick.A
#define  TOSTR2(A) " " + #A + " = " + ::DoubleToString(Tick.A, _Digits)

string TickToString( const MqlTick &Tick, const bool Flags = true )
{
  return(TOSTR(time) + "." + ::IntegerToString(Tick.time_msc % 1000, 3, '0') + TOSTR2(bid) + TOSTR2(ask));
}

void OnDeinit( const int )
{
  MqlTick Tick;

  if (SymbolInfoTick(_Symbol, Tick))
    Print(TickToString(Tick)); // Распечатываем последний тик интервала тестирования.
}


Résultat

EURGBP.rann_RannForex: history data begins from 2018.02.06 00:00
EURGBP.rann_RannForex: ticks data begins from 2018.02.06 00:00
agent process started on 127.0.0.1:3000
connecting to 127.0.0.1:3000
connected
authorized (agent build 2162)
EURGBP.rann_RannForex,M1 (MetaQuotes-Demo): testing of Experts\Test5-4.ex5 from 2019.09.28 00:00 to 2019.10.01 00:00
common synchronization completed
EURGBP.rann_RannForex: ticks synchronized already [73 bytes]
MetaTester 5 started on 127.0.0.1:3000
initialization finished
login (build 2162)
4372 bytes of account info loaded
1482 bytes of tester parameters loaded
188 bytes of input parameters loaded
2813 bytes of symbols list loaded
expert file added: Experts\Test5-4.ex5. 13105 bytes loaded
7703 Mb available, 96 blocks set for ticks generating
calculate profit in pips, initial deposit 10000, leverage 1:100
successfully initialized
14 Kb of total initialization data received
Intel Core i7-2700 K  @ 3.50 GHz, 16301 MB
EURGBP.rann_RannForex: symbol to be synchronized
EURGBP.rann_RannForex: symbol synchronized, 3720 bytes of symbol info received
EURGBP.rann_RannForex: load 57 bytes of history data to synchronize in 0:00:00.001
EURGBP.rann_RannForex: history synchronized from 2018.02.06 to 2019.10.01
EURGBP.rann_RannForex: ticks synchronization started
EURGBP.rann_RannForex: load 64 bytes of tick data to synchronize in 0:00:00.000
EURGBP.rann_RannForex: history ticks synchronized from 2019.09.30 to 2019.10.01
EURGBP.rann_RannForex,M1: history cache allocated for 611815 bars and contains 608725 bars from 2018.02.06 02:00 to 2019.09.27 23:54
EURGBP.rann_RannForex,M1: history begins from 2018.02.06 02:00
EURGBP.rann_RannForex,M1 (MetaQuotes-Demo): generating based on real ticks
EURGBP.rann_RannForex,M1: testing of Experts\Test5-4.ex5 from 2019.09.28 00:00 to 2019.10.01 00:00 started
EURGBP.rann_RannForex : real ticks begin from 2019.09.30 00:00:00
final balance 10000.00 pips
2019.09.30 23:59:58    time = 2019.09.30 23:59:58.022 bid = 0.88612 ask = 0.88741
EURGBP.rann_RannForex,M1: 101751 ticks, 1424 bars generated. Test passed in 0:00:00.558 (including ticks preprocessing 0:00:00.031).
269 Mb memory used including 35 Mb of history data, 64 Mb of tick data
log file "C:\Program Files\ICMarkets - MetaTrader 5\Tester\Agent-127.0.0.1-3000\logs\20191002.log" written
connection closed


Ce qui devrait être à la fin.


Le bug est reproduit sur n'importe quel intervalle.

 

Il existe de nouvelles options pour le regroupement des paramètres via les groupes d'entrée :

//+------------------------------------------------------------------+
//|                                                      ProjectName |
//|                                      Copyright 2018, CompanyName |
//|                                       http://www.companyname.net |
//+------------------------------------------------------------------+
input group           "Strategy #1"
input ENUM_TIMEFRAMES InpS1_TF    =PERIOD_M30;        // timeframe
input string          InpS1_Sym1  ="EURUSD";          // first leg
input string          InpS1_Sym2  ="GBPUSD";          // second leg
input int             InpS1_Period=20;                // period of sigma calculation
input double          InpS1_Sigma =3.0;               // sigma level for trade
input int             InpS1_Bars  =100;               // bars for correlation
input double          InpS1_Level =0.7;               // correlation level for trade
input double          InpS1_Lot   =0.1;               // trade lot
sinput long           InpS1_Magic =100;               // Magic Number

input group           "Strategy #2"
input ENUM_TIMEFRAMES InpS2_TF    =PERIOD_M30;        // timeframe
input string          InpS2_Sym1  ="EURJPY";          // first leg
input string          InpS2_Sym2  ="GBPJPY";          // second leg
input int             InpS2_Period=20;                // period of sigma calculation
input double          InpS2_Sigma =3.0;               // sigma level for trade
input int             InpS2_Bars  =100;               // bars for correlation
input double          InpS2_Level =0.7;               // correlation level for trade
input double          InpS2_Lot   =0.1;               // trade lot
sinput long           InpS2_Magic =200;               // Magic Number

input group           "Strategy #3"
input ENUM_TIMEFRAMES InpS3_TF    =PERIOD_M30;        // timeframe
input string          InpS3_Sym1  ="EURCHF";          // first leg
input string          InpS3_Sym2  ="GBPCHF";          // second leg
input int             InpS3_Period=20;                // period of sigma calculation
input double          InpS3_Sigma =3.0;               // sigma level for trade
input int             InpS3_Bars  =100;               // bars for correlation
input double          InpS3_Level =0.7;               // correlation level for trade
input double          InpS3_Lot   =0.1;               // trade lot
sinput long           InpS3_Magic =300;               // Magic Number

input group           "Strategy #4"
input ENUM_TIMEFRAMES InpS4_TF    =PERIOD_M30;        // timeframe
input string          InpS4_Sym1  ="EURUSD";          // first leg
input string          InpS4_Sym2  ="AUDUSD";          // second leg
input int             InpS4_Period=20;                // period of sigma calculation
input double          InpS4_Sigma =3.0;               // sigma level for trade
input int             InpS4_Bars  =100;               // bars for correlation
input double          InpS4_Level =0.7;               // correlation level for trade
input double          InpS4_Lot   =0.1;               // trade lot
sinput long           InpS4_Magic =400;               // Magic Number

input group           "Strategy #5"
input ENUM_TIMEFRAMES InpS5_TF    =PERIOD_M30;        // timeframe
input string          InpS5_Sym1  ="USDCAD";          // first leg
input string          InpS5_Sym2  ="USDCHF";          // second leg
input int             InpS5_Period=20;                // period of sigma calculation
input double          InpS5_Sigma =3.0;               // sigma level for trade
input int             InpS5_Bars  =100;               // bars for correlation
input double          InpS5_Level =0.7;               // correlation level for trade
input double          InpS5_Lot   =0.1;               // trade lot
sinput long           InpS5_Magic =500;               // Magic Number

input group           "Strategy #6"
input ENUM_TIMEFRAMES InpS6_TF    =PERIOD_M30;        // timeframe
input string          InpS6_Sym1  ="USDCHF";          // first leg
input string          InpS6_Sym2  ="USDJPY";          // second leg
input int             InpS6_Period=20;                // period of sigma calculation
input double          InpS6_Sigma =3.0;               // sigma level for trade
input int             InpS6_Bars  =100;               // bars for correlation
input double          InpS6_Level =0.7;               // correlation level for trade
input double          InpS6_Lot   =0.1;               // trade lot
sinput long           InpS6_Magic =600;               // Magic Number

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
   return(INIT_SUCCEEDED);
  }

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void OnTick()
  {

  }  
//+------------------------------------------------------------------+


Les groupes sont plus faciles à utiliser et peuvent être réduits.

 
MetaQuotes Software Corp.:

Il existe de nouvelles options pour le regroupement des paramètres par groupe d'entrée :

Les groupes sont plus pratiques à utiliser et peuvent être réduits.

Merci. J'aimerais aussi faire en sorte que l'on puisse "Réduire/réduire tous les groupes".

Raison: