![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
one synchronised symbol database object. Read / Write locos are intermixed, as there is a constant tick write.
Is there one symbol database object for all symbols at once? If so, then it turns out that the request for a tick for EURUSD potentially slows down the request for a tick for GBPUSD.
Can you prepare a MqlTick for it by the time OnTick is called, so it won't be requested from the database on the general basis?
Can you prepare a MqlTick for OnTick, so it won't be called from the database on the general basis?
That would be good, then maybe MQL5 will have predefined variables like in 4 - Ask and Bid
Most likely the slowdown is caused by high CPU consumption on the MT5 side when many EAs are running. Don't know how it is with MT4. Otherwise it's hard to explain why lags appear in a parallel running empty terminal.
Definitely, minimizing the use of trading environment API will solve the problem. After the tambourine dance I will report the results.
You've got it wrong. Each EA is purely trading (in the Tester by real ticks not slowing down) and does not depend on others. All trading logic is executed only in OnTick, no spamming of trading orders, no recursion, no globalization and no resources.
OnTrade*, OnBook are not used. Second timer and OnChartEvent for the case when certain keys are pressed.
I am sure that proper implementation (by you or me) of snapshots will greatly reduce the number of calls of regular environment functions. Correspondingly, lags will be drastically reduced.
I never thought it would come to snapshot tricks. I am studying the issue, because the standard MT5 EA implementation is lame, unfortunately.
I don't believe in your case at all.
Through TeamViewer or similar, ready to demonstrate.
Please advise how to reduce memory consumption by the Terminal? I'm using fresh ticks from CopyTicks for 16 characters. It seems, that each CopyTicks keeps in memory 128K ticks. I don't need them at all, but I keep them in memory. What does it take almost 1.5 GB? Can developers see what part of memory is used for what? Some rudimentary Task Manager.
Most likely the slowdown is caused by high CPU consumption on the MT5 side when many EAs are running. I don't know how it is with MT4. Otherwise it's hard to explain why lags appear in a parallel running empty terminal.
Definitely, minimizing the use of trading environment API will solve the problem. I will write about the results after dancing with tambourines.
This is exactly what I was talking about a few pages ago. Moreover, EAs can be quite simple and based on non-liquid symbols, i.e., the matter is not the number of mathematical operations occurring inside the code of each of the EAs. The problem lies in the terminal itself and we will not be able to fix it through improving our code. Unfortunately :(
P.S I have rewritten the logic used in half of my EAs from OnBook back to OnTick and replaced the Core i5 by Xeon E5-2678. It would seem that speed should increase, but alas, a miracle did not happen :(
At almost every step.
Hopefully cache builds don't take so long, and this lag is due to database access during database update.
Any idea why mt5 does not feature the 'Commissions' tab? They only pop up after a trade is closed.
Any idea why mt5 does not feature 'Commissions' tab? They only pop up after a trade is closed.
If you run this EA on an account with no current positions or orders.
and then manually close the position opened by the EA, then there will be three open positions on the hedge (on the netting triple volume position).
Is this the correct behaviour? I probably do not understand the Terminal correctly. Then please explain.