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.
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.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.
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.
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.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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";