
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
In general I need a rest, true, but it is not triggered. I dont say, its everywhere the case, but that build does not create an OnTick() on my system. When I roll back to 4620, the OnTick() works again.
Its not only OnTick(), the charts (without any EA or indicator) are frozen too.
The firewall stuff is also not happening on every system.
Yes, so if you know it's not a general issue, where are the information about your case ? Your system, how much charts, what is running on the chart where OnTick is not triggering, etc...
You are not a novice right ? So why reporting bug as a beginner with 0 useful information.
Who sets a while (!IsStopped()) plus a Sleep() within OnTick(). Seriously, why would anyone do that!?!?! Of course nothing is executed since you freeze the EA with your absurd code.
Sorry, but I find it annoying that you waste the space of this thread with such nonsense.
It is useful in mutli-symbol EA to replace OnTimer. OnTimer has a trouble that EA can not stop working on holidays and weekends.
Sorry you find it annoying, but that's your problem.
b4772 - no problem.
Thank you for checking.
I did not save b4772 (it seems a beta build).
Yes, so if you know it's not a general issue, where are the information about your case ? Your system, how much charts, what is running on the chart where OnTick is not triggering, etc...
You are not a novice right ? So why reporting bug as a beginner with 0 useful information.
That the debugger shows wrong information and can`t figure out the datatype can`t be system-depending, that makes no sense at all.
Anyway: Windows Server 2019 Standard on Intel i/-4770, fully in remote. Standard-system, no fancy hard- or software. Only MQL, C#, GitHub, Notepad++, Backupmaker. No other software at all. 100% clean system.
It is useful in mutli-symbol EA to replace OnTimer. OnTimer has a trouble that EA can not stop working on holidays and weekends.
Sorry you find it annoying, but that's your problem.
But that can´t be the way to solve that. Any Sleep() blocks the thread, and any EA is executed in one thread AND task. Its not like in C# where you have multiple entry points and where the same code can be executed multiple times. EAs are synchronous - always.
If you need to stop the EA during off-times, like weekends etc., you can simply check the clocks-synchronization, compare the local time to the server-time, or even simply check if the server-time is not updating anymore, cuz this will happen every time when the quotes are also not updated anymore, and then set a global flag or whatever. But blocking the thread cant be a good idea at all.
But still, this ain´t stuff for here.
But that can´t be the way to solve that. Any Sleep() blocks the thread, and any EA is executed in one thread AND task. Its not like in C# where you have multiple entry points and where the same code can be executed multiple times. EAs are synchronous - always.
If you need to stop the EA during off-times, like weekends etc., you can simply check the clocks-synchronization, compare the local time to the server-time, or even simply check if the server-time is not updating anymore, cuz this will happen every time when the quotes are also not updated anymore, and then set a global flag or whatever. But blocking the thread cant be a good idea at all.
But still, this ain´t stuff for here.
However, Sleep() does not mean that the thread is locked or blocking other threads; it simply tells the operating system: "I am willing not to occupy the CPU during this period of time."
Many brokers now offer cryptocurrencies such as Bitcoin, which can be traded at any time, including holidays and weekends, so the server time is constantly updated in real-time.
Comparing local time and server time is not a feasible method, as local time may be a few seconds slower than real time.
However, Sleep() does not mean that the thread is locked or blocking other threads; it simply tells the operating system: "I am willing not to occupy the CPU during this period of time."
Many brokers now offer cryptocurrencies such as Bitcoin, which can be traded at any time, including holidays and weekends, so the server time is constantly updated in real-time.
Comparing local time and server time is not a feasible method, as local time may be a few seconds slower than real time.
Sleep() does not block other threads, no one said that, but it stops executing the current thread. And this means also: All the ticks and other events. Your code suppresses the execution of the EA for one second after each incoming tick. And since you do, where shall the value of the params come from? You kinda bet on that the dialog window is executed in another thread and that somehow in between the value has magically reached your code variable buffers. Whatever you try to do this way and for whatever reason, its maximal unsafe and not the way to do proper.
Besides this, it is still not really working in charts: Candles have half-size-width, 1 Pixel lines are almost invisible. Thats not HighDPI.
Bug-Report:
Still, the watch-list for variables of the Debugger is broken. - It doesnt know its own internal variables.
Code to reproduce:
Forum on trading, automated trading systems and testing trading strategies
New MetaTrader 5 platform build 4755: General improvements
Dominik Egert, 2024.12.26 18:45
Code to reproduce: