error need help

 

when i put my indicator in the market it gave me this error 
EX4 file must be compiled using <a target="_blank" href="http://docs.mql4.com/en/basis/preprosessor/compilation">#property strict</a> directive.

what can i do to fix this error 
thanks in advanced  

Program Properties (#property) - Preprocessor - Language Basics - MQL4 Reference
Program Properties (#property) - Preprocessor - Language Basics - MQL4 Reference
  • docs.mql4.com
Every MQL4-program allows to specify additional specific parameters named #property that help client terminal in proper servicing for programs without the necessity to launch them explicitly. This concerns external settings of indicators, first of all. Properties described in included files are completely ignored. Properties must be specified...
 
David Ayad:

when i put my indicator in the market it gave me this error 
EX4 file must be compiled using <a target="_blank" href="http://docs.mql4.com/en/basis/preprosessor/compilation">#property strict</a> directive.

what can i do to fix this error 
thanks in advanced  

add : 

#property strict

in your ea's code header.

 
Icham Aidibe:

add : 

in your ea's code header.

thanks but it gave me this " File compiled in Debug mode "

 
David Ayad:

thanks but it gave me this " File compiled in Debug mode "

So compile it normally, using the compile button instead of the debug button.

 
Emma Schwatson:

So compile it normally, using the compile button instead of the debug button.

okay i did it and it gave me  

0 error(s), 251 warning(s), compile time: 140 

this one of the warning 

implicit conversion from 'number' to 'string'



 
David Ayad:

okay i did it and it gave me  

0 error(s), 251 warning(s), compile time: 140 

this one of the warning 

implicit conversion from 'number' to 'string' 

It seems your code is a little bit an old style. Now you should fix all of this warning. E.G. by using IntegerToString() or DoubleToString() and so on.

 
Petr Nosek:

It seems your code is a little bit an old style. Now you should fix all of this warning. E.G. by using IntegerToString() or DoubleToString() and so on.

yes i used int and double, i didn't use string 
you want me to change every int and double to string ?? 


 
David Ayad:

yes i used int and double, i didn't use string 
you want me to change every int and double to string ?? 

I don't want you do anything. I've never seen your code. But you need to fix these warnings. And the fix is depend on your code (That I've never seen).You can post here one line that causes the warning and I can show you the fix.
 
Petr Nosek:
I don't want you do anything. I've never seen your code. But you need to fix these warnings. And the fix is depend on your code (That I've never seen).You can post here one line that causes the warning and I can show you the fix.

hahah i just asking because i need fix this warning 

and thank you for your helping me .

 
David Ayad:

hahah i just asking because i need fix this warning 

and thank you for your helping me .

See also this article :
Common Errors in MQL4 Programs and How to Avoid Them
Common Errors in MQL4 Programs and How to Avoid Them
  • 2014.03.25
  • MetaQuotes Software Corp.
  • www.mql5.com
Some older programs can return errors in the new version of the MQL4 of compiler. To avoid critical completion of programs, the previous version compiler handled many errors in the runtime environment. For example, division by zero or array out of range are critical errors and usually lead to application crash. Such errors occur only in some...
 
David Ayad:

okay i did it and it gave me  

0 error(s), 251 warning(s), compile time: 140 

this one of the warning 

implicit conversion from 'number' to 'string'



I have the same problems, could someone please show me an example of how to fix the issue?

Some samples of my code:

   if(idHash == StringHash("EnterRvrAtMrkStpLss")) {

      return (ConvertToRealPips(OrderSymbol(), EnterRvrAtMrkStpLss));


or


double sqGetGlobalVariable(int ticket, string name) {

   return (GlobalVariableGet(ticket+"_"+name));

Reason: