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
As it is, I'm pinging the server, at a certain frequency in while with no delay.
More than 16 ms? What kind of server? What is the point of pinging so frequently?
Sent this to the PM.
If you press CTRL+BREAK while compiling at 22%, ME hangs.
More than 16 ms? What kind of server is it? What is the point of such frequent pings?
The point is not 16ms, it's a no-delay loop.
It reads a socket and pings heartbeat.
The point is not 16ms, it's a no-delay loop.
It reads a socket and pings heartbeat.
Got it, reading a socket.
Then why slip at all? Or is reading socket without delay a bad thing?
I can't understand the point of heartbeat at this rate (
Got it, reading a socket.
Why slip at all then? Or is reading socket without delay a bad thing?
I can't understand the point of heartbeat at this rate (
So what's a macro for?
Socket is read in loop without delay, andheartbeat is executed with defined frequency in the same loop without delay.
Slip has nothing to do with it, I wrote a slip as a part of it, it may come in handy.
The point of the macro is to set frequency of some code execution in the loop without any delay.
Not necessarilyheartbeat. You can make any macros with different frequency and they will be executed differently in the loop without any delay.
For example, Nikolai wrote a class for OnTimer. https://www.mql5.com/ru/code/31306
And here for the loop, which can go down to microseconds.
So the macro is for what?
Socket is read in a loop without delay, andheartbeat is executed at a certain frequency in the same loop without delay.
Slip has nothing to do with it, I wrote that I wrote a slip as well, it may come in handy.
The point of the macro is to set frequency of some code execution in the loop without any delay.
Not necessarilyheartbeat. You can make any macros with different frequency and they will be executed differently in the loop without any delay.
For example, Nikolai wrote a class for OnTimer. https://www.mql5.com/ru/code/31306
And here for the loop, which can go down to microseconds.
So that's what it was all about:
?
Then it's still not clear what the microsecond slip is for. Apparently, it's just "extra". Well, let it be )
So that's what it was all about:
?
Then it's still not clear why the microsecond slip. Apparently, it's just "extra". Well, let it be )
Well, you can write it that way too. I just did it through a switch and a macro.
In your example there are two calls to GetMicrosecondsCount while in mine there is one.
Yes, so the microsecond slip may come in handy in this loop.
Just the fact that microsecond slip is possible.
Got it, reading a socket.
Why slip at all then? Or is reading socket without delay a bad thing?
I can't understand the meaning of heartbeat with such frequency (
In this case slip is harmful at all. Because it gives priority to another thread and slows down your own thread.
Well, you could write it that way. I just did it with switch and macro.
And in your example there are two calls to GetMicrosecondsCount, in mine there is one.
And yes, slip as well, if microsecond slip is of any use in this loop.
Just the very fact that a microsecond slip is possible.
Not possible
Impossible
OK, let me rephrase. Within mql roughly possible, depending on processor clock speed.
What about PWM? -A pulse signal of constant frequency and variable duty cycle.
Doesn't it set a constant?