what is return(-1), return(-2) and return(0) mean

 

Hello

sometimes i see some EAs have return(-1), return(-2) and return(0) as we know it returns nothing, but what about return(-1) and return(-2)?

as in the article here

https://www.mql5.com/en/articles/1355

 
fx2013:

Hello

sometimes i see some EAs have return(-1), return(-2) and return(0) as we know it returns nothing, but what about return(-1) and return(-2)?

as in the article here

https://www.mql5.com/en/articles/1355

return(0) returns 0, return(-1) returns -1 etc.

This may help: What are Function return values ? How do I use them ?

 
  1. If you are talking about any return(value) see RaptorUK's link
  2. If you are talking about the return(value) in int start()/int init()/int deinit() mt4 ignores the value completely. They are meaningless.
Reason: