Trading Tiem Range

 
I need help to code a trading time range. I want to code an EA to start trading on 1 day and stop trading on next day. Example: start trading at 15:00 EDT and stop trading at 07:00 EDT next day.

extern bool    UseStartTime   =  true;
extern double  TradeStartHour   = 15; // local PC time
extern double  TradeEndHour     =  7; // local PC time

int h = TimeHour(LocalTime());
int d = TimeDay(LocalTime());

if( UseStartTime == true)
   {
         if (h >= TradeStartHour  ||  h <= TradeEndHour  )  // need help with this line
         {
             Order trigger and order_send code // This I already have
          }
    }



Many thanks,

Wackena


Reason: