Hey @roar.
Another day of testing is behind me. The EA is being tested on low-spread pairs that almost always have zero spread. However, to eliminate sudden spread spikes that can negatively affect the accuracy of distance checking when opening BUY positions, I modified the block functions to open opposing SELL positions.
https://fxdreema.com/shared/b3zog4Tab
Now, the spread has no influence on the accuracy of distance because it always opens a position at a fixed BID price. Unfortunately, there are still cases of premature position openings by the EA. I recorded some tests today so that you could see how it looks, but YouTube is taking so long to process the video that it would be faster if I upload screenshots instead.
The first example shows a situation of premature opening on USDJPY (bottom left corner).

Another one is GBPUSD (top right corner). You'll have to trust me that the distances are below 2 pips here :). I measured them, but after two I went off the recorded screen...

The target distance is always correctly determined by the EA. I still believe that the issue occurs when the price movement or TICK is sudden and sharp, indicating that the EA is simply too slow.
Describing it in the EA's perspective, it probably thinks like this: "Okay, the distance from the last position is 2 pips, so I can open a new one." A sudden TICK makes it just 1 pip away, and the EA still opens a new position. So, at this point, it might be beneficial to add another command for the EA to double-check before opening, ensuring that the distance is still indeed 2 pips.
This is just my logical thinking; what matters more is what you think?
What should be the next step that we should take?