Thread: MQL4 Learning
View Single Post
  #155 (permalink)  
Old 07-31-2007, 10:23 AM
Michel Michel is offline
Senior Member
 
Join Date: Feb 2006
Posts: 565
Michel is on a distinguished road
Quote:
Originally Posted by MQL4 View Post
I suspect that someone purposely gave me a certain code that sets a bug to every new EA that I create!!!!!!!!!!!!!
They do this on purpose that at the end to ask for money that I don’t have.
Don't be so paranoiac ! Your code is just full of mistake comming from your lack of knowledge.
My advise is that for every word you write, check the help file of Mql4 (you must know, it's your name ...)
For sample :
"extern double StartHour, StartMinute;
...
if (TimeHour (TimeCurrent()) == StartHour)"

Mql4 : int TimeHour( datetime time)
Returns the hour for the specified time.

you compare a double with an int, this doesn't work, you have to declare StartHour as int.

If you have the assignation statement "line = Bid;", your imediatelly following test "if (Bid > line + 12* Point)" will never be true.

in place of "TimeHour (TimeCurrent())" you can also use "Hour()"

So "Is there any other way to solve the problem except formatting the hard drive?"
Yes, just learn a little bit more.
Reply With Quote