Stop to think the problem is the validation, the problem is your code.
I assure you that all the tests were carried out without problems on all the timeframe and all the symbols with the strategy tester, I do not know where to look
I assure you that all the tests were carried out without problems on all the timeframe and all the symbols with the strategy tester, I do not know where to look
No problem with the validation :
We have no idea about your code, so not possible to help in practice.
Nous n'avons aucune idée de votre code, donc pas possible de vous aider dans la pratique.
Mais à 100%, le problème est votre code.
I checked everything, I made tests on each timeframe and on each symbol that posed a problem, everything works perfectly, but the verification is still impossible, I do not know where to look
voici mon code, j'ai volontairement supprimé les indicateurs et les conditions d'ouverture à la confidentialité , help me understand what is wrong, it's been 3 days that I try to pass the validation without success
Je n'ai toujours pas réussi à valider mon EA, j'ai remarqué que lorsque je supprime la fonction CheckVolumeValue, le résultat du test change, donc j'en déduis qu'il y a bien une erreur avec mon contrôle de lot, mais je ne vois pas laquelle, je vous donne un exemple de ma case à cocher ci-dessous
d'une part les vérifications des conditions d'entrée et d'autre part la fonction, où peut-on trouver l'erreur ?
//----- Calcul de la taille du lot -------//
double PositionSize = NormalizeDouble(AccountBalance()/100000,2);
if(PositionSize<0.01)
{
PositionSize = 0.01 ;
}
//----------------------------------------------------------------------------------------------------
if
((CheckMoneyForTrade(
Symbol
(),OP_BUY,PositionSize))==TRUE)
{
if
((CheckVolumeValue(PositionSize))==TRUE)
{
if
(checktime(
"09:00:00"
,
"19:00:00 "
))
{
//------------- Ordre Primaire ACHETER ----------------
si
( ...
...
//+- -------------------------------------------------- ---------------+
//| Vérifier l'exactitude du volume de la commande |
//+-------------------- -----------------------------------------------+
bool
CheckVolumeValue(
double
volume)
{
double
min_volume=
SymbolInfoDouble
(
Symbole
(),
SYMBOL_VOLUME_MIN
);
if
(volume<min_volume)
{
StringFormat
(
"Le volume est inférieur au minimum autorisé SYMBOL_VOLUME_MIN=%.2f"
,min_volume);
return
(
false
);
}
double
max_volume=
SymbolInfoDouble
(
Symbol
(),
SYMBOL_VOLUME_MAX
);
if
(volume>max_volume)
{
StringFormat
(
"Le volume est supérieur au maximum autorisé SYMBOL_VOLUME_MAX=%.2f"
,max_volume);
retour
(
faux
);
}
double
volume_step=
SymbolInfoDouble
(
Symbol
(),
SYMBOL_VOLUME_STEP
);
int
ratio=(
int
)
MathRound
(volume/volume_step);
if
(
MathAbs
(ratio*volume_step-volume)>
0.0000001
)
{
StringFormat
(
"Le volume n'est pas un multiple du pas minimal SYMBOL_VOLUME_STEP=%.2f, le volume correct le plus proche est %.2f"
,
volume_step,ratio*volume_step);
return
(
false
);
}
"Valeur de volume correcte"
;
return
(
vrai
);
}
It's NOT the case, you just don't see it.
Stop to think the problem is the validation, the problem is your code.
I assure you that all the tests were carried out without problems on all the timeframe and all the symbols with the strategy tester, I do not know where to look
I assure you that all the tests were carried out without problems on all the timeframe and all the symbols with the strategy tester, I do not know where to look
No problem with the validation :
We have no idea about your code, so not possible to help in practice.
But 100%, the problem is your code.
Pas de problème avec la validation :
Nous n'avons aucune idée de votre code, donc pas possible de vous aider dans la pratique.
Mais à 100%, le problème est votre code.
merci je vais revérifier
Pas de problème avec la validation :
Nous n'avons aucune idée de votre code, donc pas possible de vous aider dans la pratique.
Mais à 100%, le problème est votre code.
I checked everything, I made tests on each timeframe and on each symbol that posed a problem, everything works perfectly, but the verification is still impossible, I do not know where to look
my EA works only on gold and in M15 timeframe only
I mean you should add more one case (if else) to open for that instead M15 only to pass validation.
I seen your code you posted (and you should not post to forum), you may add a case to OnTick() function. For example:
I mean you should add more one case (if else) to open for that instead M15 only to pass validation.
I seen your code you posted (and you should not post to forum), you may add a case to OnTick() function. For example:
it doesn't work either
it doesn't work either
Je n'ai toujours pas réussi à valider mon EA, j'ai remarqué que lorsque je supprime la fonction CheckVolumeValue, le résultat du test change, donc j'en déduis qu'il y a bien une erreur avec mon contrôle de lot, mais je ne vois pas laquelle, je vous donne un exemple de ma case à cocher ci-dessous
d'une part les vérifications des conditions d'entrée et d'autre part la fonction, où peut-on trouver l'erreur ?
//----- Calcul de la taille du lot -------// double PositionSize = NormalizeDouble(AccountBalance()/100000,2); if(PositionSize<0.01) { PositionSize = 0.01 ; } //---------------------------------------------------------------------------------------------------- if ((CheckMoneyForTrade( Symbol (),OP_BUY,PositionSize))==TRUE) { if ((CheckVolumeValue(PositionSize))==TRUE) { if (checktime( "09:00:00" , "19:00:00 " )) { //------------- Ordre Primaire ACHETER ---------------- si ( ... ... //+- -------------------------------------------------- ---------------+ //| Vérifier l'exactitude du volume de la commande | //+-------------------- -----------------------------------------------+ bool CheckVolumeValue( double volume) { double min_volume= SymbolInfoDouble ( Symbole (), SYMBOL_VOLUME_MIN ); if (volume<min_volume) { StringFormat ( "Le volume est inférieur au minimum autorisé SYMBOL_VOLUME_MIN=%.2f" ,min_volume); return ( false ); } double max_volume= SymbolInfoDouble ( Symbol (), SYMBOL_VOLUME_MAX ); if (volume>max_volume) { StringFormat ( "Le volume est supérieur au maximum autorisé SYMBOL_VOLUME_MAX=%.2f" ,max_volume); retour ( faux ); } double volume_step= SymbolInfoDouble ( Symbol (), SYMBOL_VOLUME_STEP ); int ratio=( int ) MathRound (volume/volume_step); if ( MathAbs (ratio*volume_step-volume)> 0.0000001 ) { StringFormat ( "Le volume n'est pas un multiple du pas minimal SYMBOL_VOLUME_STEP=%.2f, le volume correct le plus proche est %.2f" , volume_step,ratio*volume_step); return ( false ); } "Valeur de volume correcte" ; return ( vrai ); }problem solved and validation passed! It was enough to add this for me: