pls i want to add
akintinoyea:
pls i want to add
Post your code.
pls i want to add
DeanDeV:
Post your code.
Post your code.
extern int HoursFrom = 10; extern int HoursTo = 20; int start() { int datetime = TimeCurrent(); int hour = TimeHour(datetime); if ((HoursFrom < HoursTo && hour >= HoursFrom && hour < HoursTo) || (HoursFrom > HoursTo && (hour < HoursTo || hour >= HoursFrom))) { //Do**** } }
I didn't realise you were the one with the problem sheriff. (:P )
sheriffonline:
extern int HoursFrom = 10; extern int HoursTo = 20; int start() { int datetime = TimeCurrent(); int hour = TimeHour(datetime); if ((HoursFrom < HoursTo && hour >= HoursFrom && hour < HoursTo) || (HoursFrom > HoursTo && (hour < HoursTo || hour >= HoursFrom))) { //Do**** } }
I wouldn't think that would compile using datetime as a variable name
extern int HoursFrom = 10; extern int HoursTo = 20; int start() { int hour = TimeHour(TimeCurrent()); if ((HoursFrom < HoursTo && hour >= HoursFrom && hour < HoursTo) || (HoursFrom > HoursTo && (hour < HoursTo || hour >= HoursFrom))) { //Do**** } }
You can do away with that line altogether
sheriffonline:
double StartTime=X; double FinishTime=Y; if(Hour()>=StartTime && Hour()<=FinishTime) { }
DeanDeV:
Sorry Dean but that fails if you want to run over midnight (start 1800 end 0200) GumRai has it right.
double StartTime=X; double FinishTime=Y; if(Hour()>=StartTime && Hour()<=FinishTime) { }
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register