Ea mq4 start time end time code

 

it is code not working 

 

   TimeToStr(TimeCurrent(), TIME_DATE) + " 00:00";

   TimeToStr(TimeCurrent(), TIME_DATE) + " " + Start1;

   TimeToStr(TimeCurrent(), TIME_DATE) + " " + End1;

   TimeToStr(TimeCurrent(), TIME_DATE) + " " + Start2;

   TimeToStr(TimeCurrent(), TIME_DATE) + " " + End2;

   TimeToStr(TimeCurrent(), TIME_DATE) + " 23:59";

 

What isn't working?

What are you expecting?

You don't assign to a string variable or print, we do not know what you are trying to do.

 
Gumrai :

What isn't working?

What are you expecting?

You don't assign to a string variable or print, we do not know what you are trying to do.
I wonder how to run this code mq4
 

Please do not change my post into a foreign language and then quote it. I have changed it back to English.

There is no code to run. As I already said, we have no idea what you are trying to achieve.

It is like me posting

January

It is incomplete so it means nothing

now

The first Month of the Year= January

has a meaning.

 
GumRai:

Please do not change my post into a foreign language and then quote it. I have changed it back to English.

There is no code to run. As I already said, we have no idea what you are trying to achieve.

It is like me posting

It is incomplete so it means nothing

now

has a meaning.

if (TimeCurrent() >= StrToTime("05:00") && TimeCurrent() < StrToTime("14:00")|| TimeCurrent() >= StrToTime("21:00") && TimeCurrent() < StrToTime("23:59"));

 

Now I can see what you are trying to achieve

You need to arrange your brackets

   if ((  TimeCurrent() >= StrToTime("05:00") && TimeCurrent() < StrToTime("14:00"))
      || (TimeCurrent() >= StrToTime("21:00") && TimeCurrent() < StrToTime("23:59")));

Insert the additional () as highlighted above

The highlighted ; at the end means that if the condition is met, nothing is done.

Remove the ;

   if ((  TimeCurrent() >= StrToTime("05:00") && TimeCurrent() < StrToTime("14:00"))
      || (TimeCurrent() >= StrToTime("21:00") && TimeCurrent() < StrToTime("23:59")))
         {
          //Your Code
         }

Not checked or tested.

 
GumRai:

Now I can see what you are trying to achieve

You need to arrange your brackets

Insert the additional () as highlighted above

The highlighted ; at the end means that if the condition is met, nothing is done.

Remove the ;

Not checked or tested.


thank you sir