I guess I don't understand your problem:
I compile and run this EA and it comments the time/date as per the current bar on the test, so you can get
"time" from the chart...
I compile and run this EA and it comments the time/date as per the current bar on the test, so you can get
"time" from the chart...
int init() { return(0); } int deinit() { return(0); } int start() { Comment("Bar Number = ", Bars, " Current Bar Time = ", TimeToStr(Time[0], TIME_DATE|TIME_SECONDS),"\n", "Time Hour of current bar = ", TimeHour(Time[0]), " TIme Minute = ", TimeMinute(Time[0])); return(0); }
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
Pulling my hair out!!! (what little I have)
Trying to develop a routine that will determine what the top of the next hour is (in back testing).
EXAMPLE:
If a trade exits at 21:03 I want to trigger another trade to be entered at the top of the next hour (22:00).
The normal DateTime functions are of no value because they go by the CURRENT server time and is useless for back testing. Also tried iTime() but didn't have any luck with it as well.
Any suggestions would be welcome. Keep in mind this needs to work for BACK TESTING