datetime start = StrToTime("04:30"); datetime end = StrToTime("06:00"); if(TimeCurrent() >= start && TimeCurrent() < end){ Print("TRADING"); }else{ Print("NOT TRADING"); } Comment( StringConcatenate( "Start: ", TimeToStr(start, TIME_MINUTES), " ", TimeToStr(start, TIME_DATE), "\n", "End: ", TimeToStr(end, TIME_MINUTES), " ", TimeToStr(end, TIME_DATE), "\n" ) );
nice to see someone using StringConcatenate()... the docs state is mucho faster than concatenate operator '+' yet is rare to see the builtin called ;)
Thnx! a lot.
its very Help full to me.
jmca:

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
Hi,
I want to trade between 4:30 and 6:00
It seems that i can specify a logical command for hours, with (Hours()>=4 && Hours()<=6), but specifying the minutes causes logical errors.
Any suggestions for trading this way?