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
Two, or twenty-two threads can be either synchronous or asynchronous. One thread can include both synchronous and asynchronous operations. You have indicated how. Parallel does not know how to include parallel ones.
Example: there is a synchronous function running in thread 1 and waiting for data from threads 2, 3 and 4, while functions distributed in threads 5, 6, 7 and 8 are waiting for results.
All stand and wait for result. Now, pay attention: what if the synchronous function is waiting for data from its thread? And, God forbid, this data depends on its result?
No, that's not all.
Example: there is a synchronous function running in thread 1 and waiting for data from threads 2, 3 and 4, while functions distributed in threads 5, 6, 7 and 8 are waiting for results.
All stand and wait for result. Now, pay attention: what if the synchronous function is waiting for data from its thread? And God forbid, this data depends on its result?
Ok, I'll answer it myself:
Canvas will start blinking.
I will translate what you have already been told by a representative of the MT development company:
You cannot create threads from MQL. Not even with WinAPI.
You can do this only by writing your own DLL.
You can, MQL5\Include\WinAPI\processthreadsapi.mqh has a wrapper
HANDLE CreateThread(PVOID thread_attributes,ulong stack_size,PVOID start_address,PVOID parameter,uint creation_flags,uint &thread_id);
But what to do with the tracks through MQL? That's why they wrote that we have to create a DLL and work with them there.
Example: there is a synchronous function running in thread 1 and waiting for data from threads 2, 3 and 4, while functions distributed in threads 5, 6, 7 and 8 are waiting for results.
All stand and wait for result. Now, pay attention: what if the synchronous function is waiting for data from its thread? And God forbid, this data depends on its result?
Alexei Tarabanov:
Ok, I'll answer it myself:
Canvas will start blinking.
Highlighted has no meaning.
About the other tracks, until the data is ready, will wait. Nothing will blink.