Trading at Specific Hour in MT5

It works from 12pm to 10pm
but how to make it work overnight?
i.e from today 7pm to 5am tomorrow.

&& ((dt_struct.hour >= 19) && (dt_struct.hour < 5))
does not work.
No trades made.
 
Last edited:
&& ((dt_struct.hour >= 19) && (dt_struct.hour < 5))
Such condition can never be true because, obviously, the same number cannot be greater or equal to 19 and lesser than 5. You have to swap the AND condition (&&) for OR condition here (||). You want the hour to be either greater or equal to 19 or less than 5.