how to trade from 09:00 to 11:00 , 14:00 to 16:00

 
show me the code please,thanks
 
if (Hour() > 9 && Hour() < 11 || Hour() > 14 && Hour() < 16)
   {
   //do something
   }