![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
JIC, Please note the problem does not occur on 32 bit platforms. I have provided some code in one of the earlier posts.
Until you understand why the drawing of whatever the purple lines are stops when there's a gap in the M1 bars, then I'd treat everything else as coincidence.
I'll close by returning to my opening statement: there's no reason why 64-bit Windows should cause any problems like the ones you are describing. Many people have raised reports on this forum that MT4 doesn't work properly on platforms x, y, and z, only for it eventually to turn out that the problem was with their code. You have either discovered the first bona-fide MQL4 bug in several years in a mature piece of software used by literally millions of people, or the problem is with your code. It is overwhelmingly likely from the evidence so far - e.g. separate reports from you that the problem occurs either after 16 hours or after 3-4 hours - that the problem is caused by occasional fluctuations in the data which you are not catering for properly.
AnkaSoftware:
a) Corruption of indicators happens only on Windows 64 bit platform
d) Code use is as followsDeclarations
<code>
#property indicator_chart_window
Enclosed is sample indicator, which will reproduce the problem. On 64 bit Windows platform, attach indicator to a M1 chart, and let it run for 4+ hrs.
However, if this indicator really does reproduce the problem then I must agree that it's interesting. I can't immediately see where any internal problem could be hiding. (Assuming, as before, that you have definitely ruled out things like a correlation between the problem occurring and a recent blip in connection between MT4 and the broker. You've mentioned your faith in CNS; you haven't actually confirmed that the MT4 journal contains no mention of connection problems, which in turn could be causing back-filling of the bar history.)
If you want to pursue the route of an MT4 problem, then it seems most likely to be related to passing the indicator arrays by reference. Arrays in MQL4 have strange properties such as always being static, and I suppose it is just possible that there is a weird latent issue with passing the special indicator-buffer arrays by reference which only triggers problems on Win64. Though why the operating system should make a difference in a context such as this remains a complete mystery.
I would try altering DrawMoveEx() so that it no longer takes a reference to the indicator array, and instead there are separate functions such as DrawMoveEx_Down1(), DrawMoveEx_Up1() etc which simply address the buffers as global variables. If that makes a difference then, congratulations, you've almost certainly found yourself an MT4 bug. Possibly the second one today.
Enclosed is sample indicator, which will reproduce the problem. On 64 bit Windows platform, attach indicator to a M1 chart, and let it run for 4+ hrs.
Been running for over 5hrs on Windows 7 Ultimate 64 bit, no problems.
JIC a) As suggested by you modified the code remove passing the reference, does not fix the problem. Modified code enclosed.
b) The missing bars which you are referring to, most probably due to no trade condition, hence broker sent no bars. IMHO, in case of loss of connectivity, the missing bars are available once the connection is restored. If you see my sample code, there is no dependency on bars being contiguous
Raptor, Thanks for testing. Maybe you need to joom in to see the error. I am able to reproduce the problem on Windows Server 2008 R2 Enterprise. So could be an O/S issue. Any idea, from where to get a list of MT4 recommended patches, for a particular platform.
.
Any idea, from where to get a list of MT4 recommended patches, for a particular platform.
Enclosed is sample indicator, which will reproduce the problem. On 64 bit Windows platform, attach indicator to a M1 chart, and let it run for 4+ hrs.
Still running OK as far as I can tell . . . how do I reproduce the error ?
You dont have to do anything. Other than zoom into the chart to see if the error has occurred.
If I'm looking for lines that seem to be disconnected from the chart bars (as per your first post) then I'm not getting any problems.