View Single Post
  #8 (permalink)  
Old 11-13-2006, 02:09 PM
eooojj eooojj is offline
Member
 
Join Date: Aug 2006
Location: singapore
Posts: 39
eooojj is on a distinguished road
Quote:
Originally Posted by newdigital
You may use this code:

Code:
if (UseHourTrade){
   if(!(Hour()>=FromHourTrade&&Hour()<=ToHourTrade)){
   Comment("Non-Trading Hours!");
   return(0);
   }
   }
to be inserted after int
Code:
start()
For example:

Code:
int start()
{
if (UseHourTrade){
   if(!(Hour()>=FromHourTrade&&Hour()<=ToHourTrade)){
   Comment("Non-Trading Hours!");
   return(0);
   }
   }
And in the settings of EA type the following:

Code:
extern bool UseHourTrade = True;
extern int  FromHourTrade = 19;
extern int  ToHourTrade = 21;
Hi NewDigital,

I can't thank you enough! thanks!
Reply With Quote