Download MetaTrader 5

Trading Systems: How to Develop a Reliable and Safe Trade Robot in MQL 4

To add comments, please log in or register
Did you like the article? Share it with your friends!
MetaQuotes Software Corp.
Moderator
181072
MetaQuotes Software Corp. 2007.06.05 10:06 

New article How to Develop a Reliable and Safe Trade Robot in MQL 4 has been published:

The article deals with the most common errors that occur in developing and using of an Expert Advisor. An exemplary safe automated trading system is described, as well.

Author: Shashev Sergei

Jinsong Zhang
15576
Jinsong Zhang 2008.02.08 16:34  
mark
MQL4 Comments
16319
MQL4 Comments 2011.03.22 12:22  
while((!connect) || (iteration > 60))

Looks like an infinite loop. Should be &&.

Actually, you don't really need (!connect), because the loop will end once it's true.

And:

               Sleep(10000);
               Print("Connection not restored", iteration*10,
                     "  seconds passed")

After 10 seconds, the log will say "0 seconds passed". (0*10=0)

To add comments, please log in or register