![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
I'm trying to copy the last X ticks from a given currency, but am left with sporadic results.
Here I should be retrieving the last 50 ticks starting from the current server time. It partially works; the following output shows the correct tick (bid and ask), as they line up with what I see in MetaTrader. The problem is the number of ticks varies - sometimes only a single tick, other times 4, or 9, etc. instead of 50.
If I retrieve the last 50 ticks not from server time, but from local time (2h behind), then I get 50 ticks every time.
Another weird thing is that the server time retrieved from the last tick (mt5.symbol_info_tick(currency).time) is 7h behind GMT+2, or 7h behind what is shown in the MetaTrader5 terminal. These problems persist for all broker servers I have tried.