Can anyone tell me why it gives a syntax error the following:

if(hour()>=10EST and hour()<=17EST and....)

Even the following expresion gives a syntax error:

if(hour()>=10 and hour(0)<=17);

Just trying to trade at certain New York time window.