Asynchronous and multi-threaded programming in MQL - page 11

 
Koldun Zloy:

The future is already here.

MT has Eventloop.

Thanks for the informative answer ))
Well, go ahead and explain what and where it is.
And how to write asynchronous code withEventloop by standard means?

 
Roman:

I hope the developers have heard Eventloop's idea, and will implement it in the future.

You've been heard, the admin did something he's never done before - visited the thread 3 times in an hour, that's... that's fantastic! - not many people get that much attention ;)

You don't even know the basics of computer literacy and are trying to pass off googled material as your knowledge - it's clear to everyone, the situation has gone from comical to grotesque and is close to a kind of farce ... ugh - am I a poet at heart? ... ))), ok, not about that...


answer the question why the trading terminal needs it?


SZS: this thread is on the theme of "Dear Grandpa Frost!" - then, write down all your wishes? - I do not have so many, at this point: Mr. Admin! finish the promised work on multiple inheritance in classes (or at least in interfaces) and add at least a couple of ported machine learning packages - it's been 7 years sinceALGLIB appeared in SB, something new is needed to attract users' attention and/or provide new articles (I don't know what the "trick" is - this forum is in top ten on google search for NS, MO and VR... - I suspect a tremendous amount of work has been done to get these TIC results, imho don't give up!)

 
76Igor Makanu:
...


answer the question why does the trading terminal need it?

...

What do you mean why? Why does an excavator need a more powerful motor than a car ? And why do you need 220 in the socket when your phone needs 3.5v? Always struck by questions like that. Minimalists will always be on the back foot...

People need more opportunities. Just because someone doesn't need it, doesn't mean that everyone doesn't need it. It doesn't matter who's in charge. It's simple. :)

 
Igor Makanu:

You've been heard, the admin did something he's never done before - visited the thread three times within an hour, that's... that's fantastic! - not many people get that much attention ;)

You don't even know the basics of computer literacy and are trying to pass off googled material as your knowledge - it's clear to everyone, the situation has gone from comical to grotesque and is close to a kind of farce ... ugh - am I a poet at heart? ... ))), ok, not about that...


answer the question why the trading terminal needs it?


SZS: this thread is on the theme of "Dear Grandpa Frost!" - then, write down all your wishes? - I do not have so many, at this point: Mr. Admin! finish the promised work on multiple inheritance in classes (or at least in interfaces) and add at least a couple of ported machine learning packages - it's been 7 years since ALGLIB appeared in SB, something new is needed to attract users' attention and/or provide new articles (I don't know what the "trick" is - this forum is in top ten on google search for NS, MO and VR... - I suspect a tremendous amount of work has been done to get these TIC results, imho don't give up!)

Well, yes, and asynchronous server withEventloop you wrote me )))
Once again, I'm not trained as a programmer, but for some reason I know how to write asynchronous servers for my tasks.
You boast of your skills, but don't write asynchronous code, since you are asking such questions, why?
Writing asynchronous code in one thread and executing it in a pool of threads is, to my mind, much more effective than settling for a single thread.
And such questions should be of interest first of all to people like you who have baggage of knowledge.
But the opposite tendency is observable, pros are sitting on one thread ))
Lamers write asynchronously ))

 
Igor Makanu:
...


answer the question why does the trading terminal need it?

...

For example, I want to have graphics working in one thread and calculations in another. So that interface events don't slow down the computation thread. As an example...

 
Roman:

Well yes, and asynchronous server withEventloop you wrote me )))
Once again, I'm not trained as a programmer, but for some reason I know how to write asynchronous servers for my tasks.
You boast of your skills, but don't write asynchronous code, since you are asking such questions, why?
Writing asynchronous code in one thread and executing it in a pool of threads is, to my mind, much more effective than settling for a single thread.
And such questions should be of interest first of all to people like you, with baggage of knowledge.
But the opposite tendency is observable, pros are sitting on one thread ))
Lamers write asynchronously )))

answer the question why the trading terminal needs it?


ZS: Once again, you don't understand that your examples of "needed features" with Python or Java are some kind of crutch solutions for inherently slow platforms, MQL5 is almost close to C++ in performance (this is very close to the maximum possible performance!), what will run in MQL5 in Python will run .... well, about a hundred times slower! Do you understand the difference of 100 times? Just 1 second execution in MQL5 and 1.5 minutes in Python - use this call in MQL5 10 times = 10 seconds, use in Python = 15 minutes! - I won't even test it, the order of calculations will not change much

ZZZY: Why do I need such a "necessary feature"? - the tasks of the terminal are completely different, historically client-server solutions are written in Python or Java... but not in C++ - it doesn't matter, but your examples are all client-server query processing! - Do you want to organize the terminal - trading server backwards? ))))

ZZZZZY: I'm not "boasting", while you didn't bother to read offered info for few days of discussion, but you write regularly and reply within 2-3 minutes... when do you have time to study new material? ))))


Retrig Konow:

For example, I want my graphics to run in one thread, and calculations in another. So that the interface events don't slow down the computation thread. For example...

))) - terminal is to blame - is it very slow? - it has a weak computational capability...? maybe it's caused by something else?)

 
Igor Makanu:

answer the question why does the trading terminal need it?

...

))) - it's the terminal's fault - is it too slow? - does it have weak computing power ...? maybe something else is to blame?)

Understand that MQL5 programs increase their complexity and will accrue new and new features. Whether you see it or not, it will. And it's already happening. Graphics are needed for visualization and they can consume a lot of resources. The cooler the graphics, the more. But, it's not just about graphics. There is a whole range of other tasks demanding power. Are you suggesting to put all the calculations concerning graphics, strategy, all the internal and external events into one queue? It seems strange to suggest that.

 
Igor Makanu:


Do you distinguish between sequential execution and asynchronous execution?
What does this have to do with execution speed? Everyone knows that about the speed of mql.
And you think they don't write asynchronous and multi-threaded in C++? ))
And asynchronous libraries for C++ were written for nothing?
I gave above examples of what the terminal needs it for.
And not only for the terminal, but also for those who use it!

The reason is that you don't set asynchronous tasks for yourself!
And the more so you write and develop NS, so you need it in the first place, that's one of the answers...
But no, we'll be satisfied with one thread, where mql is almost as good as C++...
Nonsense...
 
Реter Konow:

Are you suggesting to put all graphics calculations, strategy, all internal and external events into the same queue? It seems strange to suggest this.

the flies are separate, the cutlets are separate - that's the truth!

for TS, everything is simple: calculation - trade request - server response processing - position maintenance - calculation - trade request - server response processing - position maintenance....

if the calculation requires a lot of resources, it must be moved to a separate logic module (is it an indicator? is it pre-calculated data? is it a separate thread?(services are already available!) ... there are many variants, read how games were written on 486 - there is a minimum of calculations. everything was prepared in advance, but the aim is to match the computational capabilities and tasks!)


I myself am close to the topic of graphical interfaces, but unfortunately, it is a visualization in the development / search for TC, for the work of TC graphical interfaces are not needed! - Can you imagine YouTube servers, which, instead of transmitting content to the user, also play video, traffic and ... etc. graphical information on the server? )))) - why? who for? ....


Roman:

Above in the thread I have already given examples of why the terminal needs it.
answer the question why does the trading terminal need it?
 
Igor Makanu:

the flies are separate, the cutlets are separate - that's the truth!

for TS, everything is simple: calculation - trade request - server response processing - position maintenance - calculation - trade request - server response processing - position maintenance....

if calculation requires a lot of resources, it must be moved to a separate logic module (is it an indicator? is it pre-calculated data? is it a separate thread?(services are already available!) ... there are many variants, read how games were written on 486 - there is a minimum of calculations. everything was prepared in advance, but the aim is to match the computational power and tasks!


I myself am close to the theme of graphical interfaces, but unfortunately, it is a visualization in the development / search for TC, for the work of TC graphical interfaces are not needed! - Can you imagine YouTube servers, which, instead of broadcasting content to the user, also play video, traffic and ... etc. graphical information on the server? )))) - why? who for? ....


answer the question why does the trading terminal need it?

For search, for TS development (some do not need TS itself, for example George does not care about TS), MT4 is enough. What are we talking about then? Everyone has his own needs. One lives well in a monastery, and the other wants to go all over the world. In short, this conversation is about nothing. It's like me asking an artist why he should paint a picture if he can just take a stupid picture of nature. It's a stupid conversation, sorry. ))


I would add that with this outlook on life, cultural phenomena such as skateboarding would never have emerged. After all, it's completely impractical transportation. The sparseness of everything, that's the spawn of this approach.