That depends on how the EA's code is structured but normally, you just add one more condition to EA's position open and position close trade requests using TimeCurrent().
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.