CopyRates does not return the last bars - page 2

[Deleted]  
Ihsan Al-Hamd-Azeez #: Thank you for replying. But I used your modified code and I still get the same result

It seems correct to me.

As @Alain Verleyen pointed out, don't confuse the timestamp for the bars (which you are printing) and the timestamp for the Strategy Tester's Journal log log.

And also remember the Market's Quote and Trade hours.

 
Alain Verleyen #:
Of course if you are running it with the Strategy Tester !

That is really helpful. I searched for it and it was really because of running in Strategy tester. When the Advisor goes live, it reads the data correctly. Thanks