Thanks Roman for the hours you've put in here. It confirms my tought that griding has a systemic problem.
Do you think this could help? https://www.mql5.com/en/articles/4347
Do you think this could help? https://www.mql5.com/en/articles/4347

Applying the Monte Carlo method for optimizing trading strategies
- www.mql5.com
The idea beyond Monte Carlo method can be described in terms of analogy — one of scientific knowledge methods. Other examples of analogy are Hamilton's optico-mechanical analogy or similar organs in biology. If we have two objects that can be described by the same theory, then the knowledge gained from studying one of them is applicable to...
I like it that someone can put a lot of working hours into developing something like this. Not because you're looking to make profit, but because you wanted to achieve a purpose: which is to create an EA that will work on MT4 and MT5. Kudos!
Let's say I have a strategy that I feel can bring better profit(of cause, that's the reason we are all here- profit!), will you like to have it and as such, create or modify your EA on such strategy? It has nothing to do with grid system I promise.

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
New article Developing a cross-platform grider EA has been published:
In this article, we will learn how to create Expert Advisors (EAs) working both in MetaTrader 4 and MetaTrader 5. To do this, we are going to develop an EA constructing order grids. Griders are EAs that place several limit orders above the current price and the same number of limit orders below it simultaneously.
Testing the EA
Our EA is ready. Now we should test it and draw conclusions about the trading strategy's performance.
Since our EA works both in MetaTrader 4 and MetaTrader 5, we are able to select the terminal version, in which to perform the test. Although the choice is quite obvious here. MetaTrader 5 is considered to be more comprehensible and better.
First, let's perform testing without any optimization. Our EA should not fully depend on the inputs' values when using reasonable values. Let's take:
Inputs' default values remain intact (lot 0.01, step 10 points, 7 orders per grid, take profit $1).
The result is shown below:
Author: Roman Klymenko