![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
Maybe just run a couple of tests and the questions will go away?
Maybe. I wish I had more time to do the tests myself :(
Maybe just run a couple of tests and the questions will go away?
The tests only show a difference the first time you start.
Symbol(), _Symbol entries are equivalent to NULL (where NULL is allowed instead of symbol name).
In this case, there is no extra check for the existence of the current symbol, the presence of the current symbol in the Market Watch and unnecessary call properties of the current symbol, as properties of the current character is cached
That is, if a normal string parameter is specified instead of Symbol(), _Symbol or NULL, then checks for the full program and more property calls
Question:
- behavior of SymbolInfoXXX calls in these two cases, will they differ by more than a check?
?
By the way, from today's fresh logs from the latest release version of MT5:
It was 3 EAs hovering on 1 symbol, each on its own chart. And the request goes on every tick. Such spikes are of course infrequent, but in fact 1 request for new ticks coming from the last tick was executed 700 ms.
I've been monitoring for about 12 hours, but I can already see the lags crossing all limits.
3 EAs, each on its own chart, all on 1 symbol, are requesting old ticks from the previous tick via CopyTicksRange. And the lag is almost 9 seconds. And it seems that this is not the limit. Most likely the tick store is a shared resource to which access is synchronised, but even with very awful synchronisation there shouldn't be such times.
Some would say it's a one-off glitch. In those 12 hours of monitoring unfortunately there have been over a hundred 1 second exits. And these no longer look like one-off bursts. It looks like there were often multiple ticks coming in at the same time, which is what is causing these spikes.
Even if we close our eyes to the fact that 3 EAs fought over a common resource, let's look at the other monitoring:
There was only 1 Expert Advisor on the symbol. And still a second and a half. It wasn't the only one, there were other EAs on other symbols, but isn't it multi-threaded? Or ticks for different symbols can still slow each other down?
This is basic functionality for basic EAs. The platform is positioned as an algorithmic trading platform. That said, the basic functionality raises strong questions. A big request to look at it again. I'm almost sure there is room for improvement somewhere. Or would be very grateful to be able to get the last ticks since the function has been called, as suggested here
Forum on trading, automated trading systems and testing trading strategies
MT5 and Speed in Action
fxsaber, 2021.03.01 07:28
Please think about such a feature.
The problem of getting NEW ticks without skips is now solved only through CopyTicks*. It's a very cumbersome mechanism for this widespread task. It's like shooting birds with a cannon.
Hence brakes, retention of huge caches, etc.
Minimized the number of calls to SymbolInfoTick and CopyTicksRange:
The terminal and the machine (swap file disabled) with this load.
As a result, it was possible to significantly reduce the number of lag messages (less calls were made) of the regular functions.
Log in 50 minutes:
Doesn't seem too bad. There were no trade transactions. How about them, I'll see.
HOWEVER, the highlighted fragment shows that three EAs (different characters) got lagged almost simultaneously. I.e. the lag is universal for the Terminal.
Symbol(), _Symbol entries are equivalent to NULL (where NULL is allowed instead of symbol name).
In this case, there is no extra check for the existence of the current symbol, the presence of the current symbol in the Market Watch and unnecessary call properties of the current symbol, as properties of the current node are cached
That is, if you specify a simple string parameter instead of Symbol(), _Symbol or NULL, then there are checks for the full program and more request properties
Please explain again, because different interpretations of your words from forum users.
In Terminal with one EA/chart/symbol.
Such a log in 15 minutes. Seems to be a matter of slow Windows after all. In this case it is.
A clear example of the brakes that Market Watch causes.
Look at the values in the Processor column (second from right).
Forum on trading, automated trading systems and testing trading strategies
Indicators: Ping
fxsaber, 2021.03.12 10:56
Just remembered this great indicator.
It is a picture from the machine with zero ping. It turns out that the terminal's internal lag averages ~2ms. It bounces between 0-9 ms.
For example, the server received two ticks: first one, then the second one after 10 ms. So, in Terminal the second tick can be received not in 10 ms after the first one, but in 10-19 ms. On average, it is 12 ms later.
If you trade from the market (market marts or pending orders at the current price), it will be especially difficult to manage. It's hard to say whether the Developers will be able to improve anything here.
Looked at the Moscow exchange, the situation there is similar. In fact, trading through the MT5 algo, you are almost guaranteed to be at the end of the execution queue, not having time to pick up the good stuff, unfortunately.