Once again, about multithreading - page 9

 
Maxim Romanov:
In the tester everything goes in 1 thread, but in real life yes it works.

and are the benefits patent or around the margin of error?

 
Igor Zakharov:

and are the benefits patent or around the margin of error?

If the indicators are hard, there is an advantage. In a tester, yes, there is no point.
 

We plan to add ThreadXXX and exchange functions to run individual tasks.

These are not threads of the main program, but separate scripts (with OnStart handlers) that will run independently in a hidden mode similar to services.

You will be able to query and manage program lists. When starting a "thread", its ex5 file will be specified from a file on disk or its own resource. In this way, it is possible to have a single ex5 file which can easily run multiple threads from its resources and exchange data with them.

The threads will not work in the tester.
 
Renat Fatkhullin:

We plan to add ThreadXXX and exchange functions to run individual tasks.

These are not threads of the main program, but separate scripts (with OnStart handlers) that will run independently in hidden mode similar to services.

It will be possible to query and manage program lists. When a "thread" is started, its ex5 file will be specified from a file on disk or its own resource. Thus it will be possible to have a single ex5 file, which from its resources easily launches several threads and exchanges data with them.

The threads will not run in the tester.

This is good news :) .

 
dd:
I have not offered a single piece of good advice on the terms of the problem... Good night to you too...

It was, but he's not a reader, he's a writer.


dd:
my dear dear, sunshine, did you read the problem ? it's clearly described there - in a loop, a lot of other tasks have to be done in one second, e.g. to close 500 000 orders or not to close - check ... 0.1 lot, 50 000 deposit, are you good with maths? And yes, it's synthetic. But your advice is worthless.

Zajinka, figure out your shit-code, and everything will fly!

Or, if the task was so poorly formulated and you really need to speed up a single test, nothing else but OpenCL will do. But this is nonsense, most likely the approach was wrong from the very beginning. But there is no point in guessing without the code or a more detailed description.

To speed up tests, you can read posts by fxsaber, he has dealt with this problem extensively. You may use Virtual or cut the ticks. But, again, the problem is most likely in the initial problem statement or in suboptimal code.

 

to close 500,000 orders per second and count one pass for 5 days... Yeah.

Forgive me admins, but if you want to use HFT, you have to pay ~$20K for a license of special HFT software.

Or $100+k - they'll write it right for you.

 
Aleksey Mavrin:

to close 500,000 orders per second and count one pass for 5 days... Yeah.

Forgive me admins, but if you want to use HFT, you have to pay ~$20K for a license of special HFT software.

Or 100+k$ - they will write it for you.

I suspect that people who are keen on HFT at least buy a server licence at once.

The terminal is a superfluous entity when talking about fractions of seconds

 

I do not know how threads are arranged, but MT5 uses only one processor core, if the processor core is loaded to the maximum, the terminal glitches.

You should not parallele threads, but parallele tasks to other processors (cores).

 
Sergey Chalyshev:

I don't know how the threads are set up, but MT5 only uses one CPU core, if the CPU core is loaded to the max - the terminal glitches.

It does not.

Only indicators for one tool work in one thread and it will "glitch" if they are heavy and one core cannot handle it.


Sergey Chalyshev:

You should not parallele the threads but parallele tasks to other processors (cores).

This is what Windows does.

 
Andrey Khatimlianskii:

This is not the case.

Only the indicators work on one thread per tool, and will 'glitch' if they are heavy and one core can't cope.


This is what Windows does.

Windows has nothing to do with it, I know that almost any task can be paralleled to all cores

Reason: