If you want to trade during certain hours try this:

if(between(hour(),15,21)..............)

This will trade from 15:00 to 21:00 UTC