Download MetaTrader 5

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

To add comments, please log in or register
wadi2014
124
wadi2014  

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

Simon Gniadkowski
Moderator
18027
Simon Gniadkowski  
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 ?

whroeder1
15924
whroeder1  
  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.
To add comments, please log in or register