Sorry but.. Question is not making sense ..
what is internal wire baseline comfortably at 150ns - 247ns?
what is Anti-Trap Interceptor / absolute O(1) Level 3 structures?
Thread switching can usually take 1 to 3 or 5 ms in micro processors, NS no way..
Hi everyone,
I am currently optimizing a ultra-low latency ingestion layout between an external bare-metal C++20 HFT execution core and an MT5 EA via a custom native DLL bridge using lock-free Single Producer Single Consumer (SPSC) ring buffers.
During volatile gold tick regimes (XAUUSD ), the core engine handles the internal wire baseline comfortably at 150ns - 247ns using flat contiguous cache arrays. It enforces an in-memory Anti-Trap Interceptor to process Level 3 data structures within absolute O(1) time complexity.
- Memory structures: Aligned to 64-byte L1 CPU cache boundaries via alignas(64) .
- Data ingestion: Zero-allocation arrays parsing Order Flow Imbalance (OFI) metrics.
Has anyone successfully eliminated standard Windows OS thread-switching latency inside an MQL5 DLL import layer when passing active pointers from contiguous C++ memory slots?
Sorry but.. Question is not making sense ..
what is internal wire baseline comfortably at 150ns - 247ns?
what is Anti-Trap Interceptor / absolute O(1) Level 3 structures?
Thread switching can usually take 1 to 3 or 5 ms in micro processors, NS no way..
He meant microseconds I guess, not milliseconds.
30 to 50 cycles is for a user-level thread switching, I am not sure that can apply here in a setup implying MT5, a DLL and C++ ("standard Windows OS thread-switching latency"), how do you come to that conclusion ?
I am noticing occasional serialization drag at the terminal interface.
What does that mean exactly ? We can only guess you have a bottleneck...somewhere. It's rather vague indication of your actual problem.
Has anyone successfully eliminated standard Windows OS thread-switching latency inside an MQL5 DLL import layer when passing active pointers from contiguous C++ memory slots?
Windows thread switching (context switching) latency typically takes between 1 to 5 microseconds on modern consumer CPUs, though the overall scheduler interval (quantum) dictates when switches happen globally every 10 to 15 milliseconds
- Context Switch Time: The actual CPU cost to save one thread's state and load another takes roughly 1,000 to 5,000 nanoseconds under normal conditions.
- The Quantum: Windows allocates execution slices (quanta) to threads—typically 2 clock intervals (10–15 ms) on client operating systems like Windows 10 and 11.
- Forced Switching: If a higher-priority thread becomes ready, or a thread exhausts its quantum/blocks on I/O, the Windows scheduler triggers a context switch immediately.
He meant microseconds I guess, not milliseconds.
30 to 50 cycles is for a user-level thread switching, I am not sure that can apply here in a setup implying MT5, a DLL and C++ ("standard Windows OS thread-switching latency"), how do you come to that conclusion ?
I got you but from my understanding, with the information provided there is no way to know what thread mechanism is used.
So it could be standard OS thread which require 1 to 5 µs or some user thread requiring 30 to 50 cycles.
Additionally we don't even now what the actual problem is, are we sure the thread switching is the problem ? We can't state it from the provided information. Unless I misunderstood something (?).
Of course, I do agree on your general points about core assignment, and that it's strange to use such system with an MT5 backend.
I got you but from my understanding, with the information provided there is no way to know what thread mechanism is used.
So it could be standard OS thread which require 1 to 5 µs or some user thread requiring 30 to 50 cycles.
Additionally we don't even now what the actual problem is, are we sure the thread switching is the problem ? We can't state it from the provided information. Unless I misunderstood something (?).
Of course, I do agree on your general points about core assignment, and that it's strange to use such system with an MT5 backend.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi everyone,
I am currently optimizing a ultra-low latency ingestion layout between an external bare-metal C++20 HFT execution core and an MT5 EA via a custom native DLL bridge using lock-free Single Producer Single Consumer (SPSC) ring buffers.
During volatile gold tick regimes (XAUUSD ), the core engine handles the internal wire baseline comfortably at 150ns - 247ns using flat contiguous cache arrays. It enforces an in-memory Anti-Trap Interceptor to process Level 3 data structures within absolute O(1) time complexity.
Has anyone successfully eliminated standard Windows OS thread-switching latency inside an MQL5 DLL import layer when passing active pointers from contiguous C++ memory slots?