Thread: MQL4 Learning
View Single Post
  #527 (permalink)  
Old 12-10-2008, 04:07 PM
Roger09 Roger09 is offline
Senior Member
 
Join Date: Oct 2008
Location: Vancouver, BC
Posts: 166
Roger09 is on a distinguished road
Quote:
Originally Posted by grinding123 View Post
can anyone give me the code for adding set trading times to an ea as i only what it to trade for a few hwers a day, not all day


thank you all for your help
If your time from 10am to 5pm, put this string at the beginning of start block:
if (TimeHour(TimeCurrent())<10||TimeHour(TimeCurrent( ))>=17)return(0);
Reply With Quote