Features of the mql4 language, subtleties and techniques - page 19
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
Forum on trading, automated trading systems and testing trading strategies
Libraries: Expert
fxsaber, 2019.06.04 16:40
Alternative
Forum on trading, automated trading systems and trading strategy testing
Any newbie questions on MQL4 and MQL5, help and discussion on algorithms and codes
fxsaber, 2019.06.04 19:40
It won't always work, but more often than not it's enough.
The task was to save all the ticks (without losses) from the Market Watch with the least effort.
I wrote a Loader-script, which opens a chart for each symbol and runs the indicator-collector on it.
The whole trick is to run the indicator through loading such a tpl-file (given in full)
It is good because there are no bars. Therefore no resources are spent on them.
At the end of the day there are 60 charts. The same amount of indicators. ~500Kb of ticks per minute are written.
RAM ~450Mb, CPU ~3-8% (8 HyperThreading).
If you want to do something like this, I highly recommend to run Expert Advisor, which keeps track of how often data changes in Market Watch. My EA does not refresh for more than three seconds and then it is forced to re-login. The thing is that MT4 (and MT5 as well) in case of network problems it can re-login itself after 10-15 seconds, and sometimes up to a minute. Only then does the re-login itself. In order not to lose ticks in those 10-15 seconds or even a minute, I recommend to take the task of reconnection. The same applies to terminals with combat TCs.
The challenge is to save all the ticks (without losses) from the Market Watch with the least amount of effort.
Is it lossless? This myth has already been dispelled.
No losses, then? I think that myth has been dispelled already.
I don't remember exactly how I convinced myself of it. I know that I compared the collected history in MT4 with the one at the broker. I got a 100% match.
I use the HistoryTicks solution from QB. When I compare virtual tester's result on collected ticks and MT5 tester's result on downloaded ticks - 100% match.
Problems can only be due to connectivity. Expert Advisors, of course, miss. Indicators do not.
I don't remember exactly how I convinced myself of this. I know that I compared the collected history in MT4 with the one at the broker. There was a 100% match.
I use the HistoryTicks solution from QB. When I compare virtual tester result on collected ticks and MT5 tester result on downloaded ticks - 100% match.
Problems can only be due to connectivity. Expert Advisors, of course, miss. Indicators do not.
Ahem... I was just talking about your exposure:
Forum on trading, automated trading systems and trading strategy testing
Errors, bugs, questions
fxsaber, 2018.02.26 09:05
If a pack of three ticks came, the Calculate event will be called three times, but SymbolInfoTick will return the latest tick on each of those three calls. I.e. the so-called collection of ticks without passing through indicators is questionable, to put it mildly.
Has something changed?
Ahem... I was just talking about your exposure:
Has anything changed?
When there was fiddling with CopyTicks, there was a comparison of tick collection and CopyTicks results.
I do not remember exactly, but I think there was a match.
We have to use CustomTicksAdd to add a batch of ticks and look at it. But it's MT5.
For MT4 it can be checked this way. Two neighboring recorded ticks should always be different. And the tick volumes of the bars on the server should coincide with the bars from the collected ticks.
In 2018 I must have known something clever. Can't remember now.
I don't remember exactly how I convinced myself of this. I know that I compared the collected history in MT4 with the one at the broker. There was a 100% match.
I use the HistoryTicks solution from QB. When I compare virtual tester result on collected ticks and MT5 tester result on downloaded ticks - 100% match.
Problems can only be due to connectivity. Expert Advisors, of course, miss. Indicators do not.
Forum on trading, automated trading systems & strategy testing
Give an advisor to collect tick history
zenz, 2018.03.07 11:10
I did the comparison back in September. The Alpari archive has a 1 week publishing delay, so if I do the current comparison, I won't get it before next week (and I don't see much point - I've already figured it out for myself).
So here are two screenshots from 22.09.2017. The terminal was running on an empty computer, with the only indicator that wrote the log. Operating system XP SP3, terminal version MT4 build 1090. Alpari Pro-ECN Real account.
On the left is the picture from the Alpari archive, and on the right are the ticks recorded by the indicator.
Here you may notice that ticks before 17 seconds and after (16 and 18 seconds) coincide completely, i.e. the case, in this case, is not in desynchronization of time. I repeat that it is not only within one second that the ticks skip - i.e. not only the fast ticks - but the "slow" ones are also swallowed. I haven't found any systematicity in this.
Explanation: To the right of the point after the seconds in Alpari's archive is not miles or microseconds, but the number of tick - it is done that way for some reason.
Here's the link to that thread:https://www.mql5.com/ru/forum/229889/page4#comment_6741502 I don't think anything has changed in MT4 since then, although I haven't checked anymore, but I assume that both indicators and EAs in MT4 miss ticks.
Here is the link to that thread:https://www.mql5.com/ru/forum/229889/page4#comment_6741502. I don't think anything has changed in MT4 since then, although I haven't checked anymore, but I assume that both indicators and EAs in MT4 miss ticks.
There is no certainty that on the trade server side, these "missed" ticks were sent.
There is no certainty that on the trade server side these 'missed' ticks were sent.
I was pondering this too, I agree. I was just doing research at the time and found that the discrepancies were not isolated, but recurring - so I let it go.