If you do any printouts after OrderSend (e.g. order sending result), it's better to accumulate them in a string-variable, and send it to print on exit from On-function.
Otherwise, you may lose a lot of money connecting to a Print-snapshot. How much - you can answer, if someone runs the above advisor on his VPS.
If you make any printouts after OrderSend (e.g. order sending result), it is better to accumulate them in a string-variable, and send it to print on exit from On-function.
Otherwise, you may lose a lot of money connecting to a Print-snapshot. How much - you can answer, if someone runs the above advisor on his VPS.
On my $3 VPS
2020.10.0809:50:59.631 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 3121 mсs.
2020.10.0809:50:59.724 Test Print (EURUSD,H1)
2020.10.0809:50:59.724 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 78 mсs.
2020.10.0809:50:59.837 Test Print (EURUSD,H1)
2020.10.0809:50:59.837 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 86 mсs.
2020.10.0809:50:59.930 Test Print (EURUSD,H1)
2020.10.0809:50:59.931 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 159 mсs.
2020.10.0809:51:00.036 Test Print (EURUSD,H1)
2020.10.0809:51:00.036 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 84 mсs.
2020.10.0809:51:00.138 Test Print (EURUSD,H1)
2020.10.0809:51:00.138 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 94 mсs.
2020.10.0809:51:00.243 Test Print (EURUSD,H1)
2020.10.0809:51:00.243 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 86 mсs.
2020.10.0809:51:00.380 Test Print (EURUSD,H1)
2020.10.0809:51:00.380 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 54 mсs.
2020.10.0809:51:00.973 Test Print (EURUSD,H1)
2020.10.0809:51:00.973 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 79 mсs.
2020.10.0809:51:01.129 Test Print (EURUSD,H1)
2020.10.0809:51:01.129 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 91 mсs.
2020.10.0809:51:01.186 Test Print (EURUSD,H1)
2020.10.0809:51:01.186 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 60 mсs.
2020.10.0809:51:01.320 Test Print (EURUSD,H1)
2020.10.0809:51:01.321 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 75 mсs.
2020.10.0809:51:01.402 Test Print (EURUSD,H1)
2020.10.0809:51:01.402 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 86 mсs.
2020.10.0809:51:01.546 Test Print (EURUSD,H1)
2020.10.0809:51:01.555 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 72 mсs.
2020.10.0809:51:02.158 Test Print (EURUSD,H1)
2020.10.0809:51:02.158 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 67 mсs.
2020.10.0809:51:04.651 Test Print (EURUSD,H1)
2020.10.0809:51:04.651 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 74 mсs.
2020.10.0809:51:04.929 Test Print (EURUSD,H1)
2020.10.0809:51:04.930 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 200 mсs.
2020.10.0809:51:07.200 Test Print (EURUSD,H1)
2020.10.0809:51:07.200 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 58 mсs.
2020.10.0809:51:07.330 Test Print (EURUSD,H1)
2020.10.0809:51:07.330 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 68 mсs.
2020.10.0809:51:07.452 Test Print (EURUSD,H1)
2020.10.0809:51:07.460 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 77 mсs.
2020.10.0809:51:07.728 Test Print (EURUSD,H1)
2020.10.0809:51:07.728 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 64 mсs.
2020.10.0809:51:07.870 Test Print (EURUSD,H1)
2020.10.0809:51:07.870 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 72 mсs.
2020.10.0809:51:07.967 Test Print (EURUSD,H1)
2020.10.0809:51:07.967 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 58 mсs.
2020.10.0809:51:08.130 Test Print (EURUSD,H1)
2020.10.0809:51:08.130 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 56 mсs.
2020.10.0809:51:11.274 Test Print (EURUSD,H1)
2020.10.0809:51:11.275 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 63 mсs.
2020.10.0809:51:11.409 Test Print (EURUSD,H1)
2020.10.0809:51:11.409 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 73 mсs.
2020.10.0809:51:11.903 Test Print (EURUSD,H1)
2020.10.0809:51:11.903 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 86 mсs.
2020.10.0809:51:12.022 Test Print (EURUSD,H1)
2020.10.0809:51:12.022 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 79 mсs.
2020.10.0809:51:12.699 Test Print (EURUSD,H1)
2020.10.0809:51:12.700 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 69 mсs.
2020.10.0809:51:12.977 Test Print (EURUSD,H1)
2020.10.0809:51:12.977 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 67 mсs.
2020.10.0809:51:13.226 Test Print (EURUSD,H1)
2020.10.0809:51:13.226 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 98 mсs.
2020.10.0809:51:13.412 Test Print (EURUSD,H1)
2020.10.0809:51:13.412 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 93 mсs.
2020.10.0809:51:13.854 Test Print (EURUSD,H1)
2020.10.0809:51:13.854 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 59 mсs.
2020.10.0809:51:14.000 Test Print (EURUSD,H1)
2020.10.0809:51:14.000 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 62 mсs.
2020.10.0809:51:18.343 Test Print (EURUSD,H1)
2020.10.0809:51:18.343 Test Print (EURUSD,H1) Alert: Time[Test Print.mq5 5: Print()] = 86 mсs.
Forum on trading, automated trading systems and trading strategy testing
MT5 and Speed in Action
fxsaber, 2020.10.07 11:13
Can't check how it will be on slow VPS.
If you do any printouts after OrderSend (e.g. order sending result), it's better to accumulate them in a string-variable, and send it to print on exit from On-function.
Otherwise, you may lose a lot of money connecting to a Print-snapshot. How much - you can answer, if someone runs the above advisor on his VPS.
ZZZ The simplest implementation.
On a fast machine this solution is much faster than the usual approach. How on VPS - don't know.
If you make any printouts after OrderSend (e.g. order sending result), it is better to accumulate them in a string-variable, and send it to print on exit from On-function.
Otherwise, you may lose a lot of money connecting to a Print-snapshot. How much - you can answer, if someone runs the above advisor on his VPS.
On my $3 VPS
On my $3 VPS.
Thank you. Definitely a better workaround.
It is more expensive to send to someone else's chart than to your own.
Try it this way:
Try it this way:
Result.
When metering is switched off.
I.e., it takes less than 10µs to switch to "OnEmpty".
Why not do the same for zero?
I.e. it takes less than 10µs to switch to "OnEmpty".
Why not do the same for zero?
Different meaning and different execution mechanism. 0 - event to "own" chart. -1 - event in own chart queue.
Forum on trading, automated trading systems and trading strategy testing
MT5 and Speed in Action
fxsaber, 2020.10.07 12:41
I've never tried to use TimeCurrentMsc in MQL5, despite my repeated requests.
Will it be?
Different meaning and different execution mechanism. 0 is an event in the "own" chart queue. -1 - event in own queue.
It turns out, that through -1 asynchrony of the same Alert cannot be implemented.
This means that it takes less than 10 microseconds to switch to OnEmpty.
As you can see with your help everything was solved faster than the most optimistic predictions, it turned out that there is a hidden backdoor
Will there be?
Not quite the same, but a counter by mcs interval.
YesTimeCurrentMcs wouldbe better, I join the wish.