[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 99

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
How should midnight be considered?
Carefully.
If you write if(Hour() >= 21 || Hour() < 5) it will be from 21.00 to 4.59.
&& have to
It's strange. It slips through midnight and doesn't account for it at all?
Logic: from 9 p.m. to whatever... or ...from whatever to 4.59 inclusive! Is that clear now? If you put &&(and), then the first condition contradicts the second. You can't be from 21 and up to 5, and or gives two independent cases. I've chewed it up and put it in my mouth, all you have to do is swallow it. Bon appetit! ;))
Aleksey, sorry, you were mistaken! That's all right, it happens!
&& have to
If only it had been written to which place, it would have been worth the price of the message)))
If only it had been written to exactly where, then it would not have been worth the price of the message))))
Instead of ||
No, you didn't :))
Anyway, if(Hour() < 21 && Hour() >= 5) Can=false;
Instead of ||
No, that was wrong :)
In short, if(Hour() < 21 && Hour() >= 5) Can=false;
:)
"... And from five to nine it's very, very different, and from five to nine I sing, laugh and cry..."