[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

 
How should midnight be taken into account?
 
MikeM:
How should midnight be considered?

Carefully.
 
borilunad:
If you write if(Hour() >= 21 || Hour() < 5) it will be from 21.00 to 4.59.

&& have to
 
hoz:

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!

 
tara:

&& have to

If only it had been written to which place, it would have been worth the price of the message)))
 
Allis:

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;

 
tara:

Instead of ||

No, that was wrong :)

In short, if(Hour() < 21 && Hour() >= 5) Can=false;

Alexey, you prefer connection and disconnection. Quite understandable! So do I. :)
 

:)

"... And from five to nine it's very, very different, and from five to nine I sing, laugh and cry..."

 
Does anyone know why the DailyPivotPoints indicator always has to compile again from midnight so that the Pivot Line, support and resistance move to other levels? What and how should I put in so that they update themselves and 0.00?
 
Maybe deinit should be written to switch off at 23.59 and ininit should be written to switch on at and from 0.00? What do you think?