
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
I believe so, but since it has been a long while, I no longer remember the specifics of what we had discussed.
Your project has since then also evolved, so I would need to be reprised on the details and then carry out some tests to confirm.
So would it be possible to overcome that 25ms OnTimer() restriction with an MQL service app?
If you want this to be solved reliably, future proof, a full rewrite would be required. But I am 100% confident, this can be done in a way, you would never need to fight it again.
Why would you wanna rewrite a stable solution which is already high-end in view of performance, safety and sharing-fairness? We are already somewhere between Unix UDS level and shared-memory. Safety? We have zero losses.
At the moment I am facing only two (possible) issues, possible, maybe partly real:
1. The restriction within OnTimer(), while is not that big deal, since it mainly affects the ping-time. Once its reached, further messages can be handled instantly after this first access - <>5000 sync messages average. Nonetheless: MQL service, if it can provide something better than OnTimer(), maybe simply while (true) { if (server.Listen()) .... Sleep(0); } that issue would be already be solved.
2. Still the thing with the transferred data. At the moment it also works without problem, thats why I pointed out I´d be interested to see sth which is more safe in view of possible future changes within MQL.
Edit: Did some research with local, serverless SQL The access/read/write time for one single value is already 1000 times more than the current solution needs for the whole struct.What am I missing here?
Why would you wanna rewrite a stable solution which is already high-end in view of performance, safety and sharing-fairness? We are already somewhere between Unix UDS level and shared-memory. Safety? We have zero losses.
At the moment I am facing only two (possible) issues, possible, maybe partly real:
1. The restriction within OnTimer(), while is not that big deal, since it mainly affects the ping-time. Once its reached, further messages can be handled instantly after this first access - <>5000 sync messages average. Nonetheless: MQL service, if it can provide something better than OnTimer(), maybe simply while (true) { if (server.Listen()) .... Sleep(0); } that issue would be already be solved.
2. Still the thing with the transferred data. At the moment it also works without problem, thats why I pointed out I´d be interested to see sth which is more safe in view of possible future changes within MQL.
Edit: Did some research with local, serverless SQL The access/read/write time for one single value is already 1000 times more than the current solution needs for the whole struct.What am I missing here?
Yeah, a service will solve your OnTimer issue, dont use an SQL, use a shared memory, like you (probably) already do.
All the tick-data fields can in general all be converted to "long" data-types, and so you could transfer it as a simple array of long and not depend on "structs".
EDIT: The price fields can either be "union-ed" between double and long, or they can be scaled (divided by point size) to become true integer based values.
Whenever they decide to any kind of alignment within structs, im doomed.
I'm not very knowledgeable about this and will probably say something stupid. But what if you explicitly set the alignment for your structures?
I'm not very knowledgeable about this and will probably say something stupid. But what if you explicitly set the alignment for your structures?
Any factual comments are welcome, thank you.
Of course, can be done like this. I even practice manual alignment, also in C#. That means, the struct itself is packed bytewise, but the data inside is organized in 4 byte alignment nonetheless. No bool, just int/uint, ulong/long, double. Nothing else.
I should have rather written: " Whenever they decide to any kind of very special alignment within structs, im doomed.". Means, what if they decide to add a header before the first field or sth like that. You never know.