I did a merge of several strategies, it works wonderfully.
After a while, I generate new strategy.
I took back my old strategy that I put in the same databank that I merged into 1 strategy.
Now I have a "Failed to copy from indicator ... Error 4806" error.
he tells me that these are the indexes: 56, 11, 28, 38, 53 (See Attachment)
After several searches I find what are the errors thanks to the step by step mode. I realize that the cursor returns to these variables which break problem (4).
LongEntrySignal40 = (((changesUp(ADX_21, 1, 1)
ShortEntrySignal40 = (((changesUp(ADX_21, 1, 2)
LongEntrySignal39 = (((((sqIsFalling(BOLLINGERBANDS_9, 3, false, 2 + 1, 1 + 1))
ShortEntrySignal33 = (((((NormalizeDouble((double) sqGetIndicatorValue(QQE_6, 1, 3), 6) == NormalizeDouble((double) 645354175, 6))
Attachment Portfolio no bug first version.ex5 added
Attachment Portfolio no bug first version.mq5 added
Attachment Portfolio no bug first version.sqx added
I forgot to specify that the line of code that I put which poses a problem are the same as in my first merge which never returned an error.
I made the comparison to see if there was any difference but I found none ...
Attached my first version which contains the lines that break problem, but I have no error with ...
Status changed from New to Refused
the problem is you use different timeframes in the merged strategy.
You should create a merged portfolio only from strategies with the same symbol and timeframe.
Otherwise you may experience those errors 4806.
Also our MQL code is not prepared to handle multiple timeframes correctly.
In OnTick method we take into account only the timeframe of the chart the EA is attached to.
Best regards,
Tomas
I just generated the strategies in multi timeframe WITH M15, H1 and H4.
So the strategies are on the same timeframe to process the trades.
What I don't understand is that it works very well with the first version ...
How can we add the code to unlock the situation?
I tried to run your portfolio on my demo account and it behaves normally, no errors so far.
I think the problem is your MetaTrader doesn't have the data it needs to compute indicator values.
Attachment Capture2.png added
But there is something that I do not understand.
I have in my version 12 strategies merge into 1.
I have no errors with this version 1.
In version 2 I have 40 strategies including the 12 of version 1.
Only the errors come from the 12 strategies in version 2. When I test with version 1 I have no bug ... On the forum when I gave the code to one of your collaborator he told me to also have them errors.
Still no solution? I sold an EA which has this message in the expert tab, result I have buyers from the community mql5 who are complaining ...
Please find a solution quickly ...
Even if I use the same EA and try to run on custom or live symbol with various date ranges, the error never occurs.
We will investigate this issue further, but it looks like it's some kind of problem of MetaTrader itself.
I personally use Alpari, but I'm not sure if it is a broker-related problem.
It has nothing to do with portfolios.
Yes it's true, I also have differences between backtest and live use.
The backtest does not come up with an error 4806, but in actual use I have the error 4806.
What I don't understand is that it's never been seen before? it's new ?
This kind of error is a new thing, it didn't happen until recently.
Yes really strange because all the backtests that I do and the tests on a real VPS server show me real errors that do not take place in backtest. However, sometimes I have the error in backtest, but I did not test in real life if the error is also present.
I didn't try with MT4 if it's also the same problem.
I am a C #, C ++, VB.net python ect professional developer .... I have no trouble reading the generated code but the error seems random. Difficult to repeat.
We have tried a lot of things, but nothing helped. The problem happens also when getting data from MT built-in indicators, so it seems like it's not a problem in our custom indicators code.
We are still trying to identify the problem. If you make some progress, please let us know.
I do not know if I will help but I had an idea, a lead can be.
Since the error this occurs with the CopyBuffer () founction and that according to my experience happened with this error.
Notably the fact that the strategy which returned the error to work well the previous version and that after that does not work any more just because I enriched the number of strategies.
That the language approaches C see C ++, I wonder if it is not a problem on the memory. I don't know what exactly but that's what I'm wondering.
I would love to have the code for the CopyBuffer function and the sub-functions.
I ask the question on the MQL5 forum a moderator replied with a "boat" solution, he doesn't know any more I have the impression ...
Here is the link: https://www.mql5.com/en/forum/369669
Status changed from In progress to Fixed
Don't work