Hello friends, because after passing my code from mql4 to mql5 the automatic validation test gives me errors.
I explain, when I realized I had errors, I started commenting on the code to see where the error was and the error starts in the construction of an object,
but the code was well written. I send you an image with the error, plus a code that is well written and that in the validation test generates errors automatically.
Greetings.
//+------------------------------------------------------------------+//| error.mq5 |//| Copyright 2018, Automatic validation error |//| https://www.mql5.com|//+------------------------------------------------------------------+#property copyright"Copyright 2018, Automatic validation error"#property link"https://www.mql5.com"#property version"1.00"#include<ParameterCheck(mql5).mqh>//File to check server errors.//+------------------------------------------------------------------+//| |//+------------------------------------------------------------------+intOnInit()
{
return(INIT_SUCCEEDED);
}
voidOnTick()
{
ObjectCreate(0,"Bid",OBJ_LABEL,0,0,0);
ObjectSetInteger(0,"Bid",OBJPROP_XDISTANCE,900);
ObjectSetInteger(0,"Bid",OBJPROP_YDISTANCE,31);
ObjectSetInteger(0,"Bid",OBJPROP_CORNER,2);
ObjectSetString(0,"Bid",OBJPROP_TEXT,DoubleToString(SymbolInfoDouble(Symbol(),SYMBOL_BID)));
ObjectSetString(0,"Bid",OBJPROP_FONT,"Arial");
ObjectSetInteger(0,"Bid",OBJPROP_FONTSIZE,9);
ObjectSetDouble(0,"Bid",OBJPROP_ANGLE,0.0);
ObjectSetInteger(0,"Bid",OBJPROP_ANCHOR,ANCHOR_LEFT_UPPER);
ObjectSetInteger(0,"Bid",OBJPROP_COLOR,clrRed);
ObjectSetInteger(0,"Bid",OBJPROP_BACK,false);
ObjectSetInteger(0,"Bid",OBJPROP_SELECTABLE,false);
ObjectSetInteger(0,"Bid",OBJPROP_SELECTED,false);
ObjectSetInteger(0,"Bid",OBJPROP_HIDDEN,true);
ObjectSetInteger(0,"Bid",OBJPROP_ZORDER,1);
// If I put this, it gives me a validation error and if I delete it from the code it does not give me errors//-----------------------------------+if(ObjectFind(0,"Bid")==0)
{
ObjectDelete(0,"Bid");
}
//-----------------------------------+Comment( GetLastError());
}
//+------------------------------------------------------------------+
Para iniciar sesión y usar el sitio web MQL5.com es necesario permitir el uso de Сookies.
Por favor, active este ajuste en su navegador, de lo contrario, no podrá iniciar sesión.
Ha iniciado sesión. La autenticación de dos factores se ha desactivado. Vuelva a configurarla y escanee un nuevo código QR, o continúe con la autenticación de dos factores desactivada.
Hello friends, because after passing my code from mql4 to mql5 the automatic validation test gives me errors.
I explain, when I realized I had errors, I started commenting on the code to see where the error was and the error starts in the construction of an object,
but the code was well written. I send you an image with the error, plus a code that is well written and that in the validation test generates errors automatically.
Greetings.