View Single Post
  #5 (permalink)  
Old 10-08-2007, 07:57 AM
newdigital newdigital is offline
Administrator
 
Join Date: Sep 2005
Posts: 16,315
Blog Entries: 106
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
For example:

Timefilters.

For any kinds of timefilter, in the beginning of the code type the following:
Code:
extern bool UseHourTrade = True;
extern int  FromHourTrade = 8;
extern int  ToHourTrade = 17;


1. Timefilter with comments.

After this code
Code:
int start()
{
type the following:
Code:
if (UseHourTrade){
   if((Hour()>=FromHourTrade)&&(Hour()<=ToHourTrade))
      Comment("Trading Hours");
   else
     {
      Comment("Non-trading Hours");
      return(0);
     }
   }
EA will trade from 8 am till last bar (or last tick) before 18.
Reply With Quote