Francesco Grassi: Anyone has been able to find a solution to this?
There is no solution because you don't even know what is wrong.
Add some debug prints to your code, including _LastError and prices and find out why. Do you really expect us to debug your code for you?

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
Hello community,
i'd like to ask if someone else encountered this weird error that can only appear during backtest (and not on demo or live): OrderSend error 4107.
The error should be related to:
I tried to normalize those values and to print them during the backtest to check if there is something wrong but everything seems fine. And before it happens, the EA already opened and closed thousands of orders so it's very unlikely that the problems is in my code and to enforce my thought there is the fact that it doesn't happen always to the same point of backtest.
For example if i start backtest from january, the errors may happen at march. If i start from march (to see what's wrong at that point), the errors don't happen at the same point anymore but after few months again.
Sadly from the point the errors come, it's impossible to continue the backtest as it keep spamming that error.
Anyone has been able to find a solution to this?
Thanks.