Errors, bugs, questions - page 1506
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
Please forgive any incomplete information.
1. the information is in the Log tab:
2. The indicator being tested for removal is the standard Bollinger Bands:
- the indicator file is located at C:\Program Files\Alpari Limited MT5\MQL5\Indicators\Examples\BB.ex5;
- The compiled file is added to the chart manually;
- both files are attached to this post.
3. Full Expert Advisor code that removes the indicator and on which the bug is detected:
void OnInit(){
ChartIndicatorDelete(0,0,"Bollinger Bands");
}
Test result:
After dragging such an "Expert Advisor" (in the application - DeleteInd.ex5) on the chart
Bollinger Bands added manually to the chart are deleted but the chart is not scaled after that when chart size changes.
Thank you for such a detailed and well formatted question (no one has written like this in a long time!).
What I have going on is this:
I get an error
ERR_CHART_INDICATOR_CANNOT_DEL
4115
Error when deleting the indicator from the chart
This error occurs because after deletion of the indicator from the EA, the chart window where BB was, though we can see it, but in fact it is already deleted. To check this, after running the Expert Advisor, switch to another profile in the terminal and then go back (to the old profile) and find that the chart has flushed like a cow.
My configuration:
Thanks for such a detailed and well-written question (it's been a long time since anyone has written like this!).
Here's what's going on:
I get an error
ERR_CHART_INDICATOR_CANNOT_DEL
4115
Error when deleting the indicator from the chart
This error occurs because after deletion of the indicator from the EA, the chart window where BB was, though we can see it, but in fact it is already deleted. To check this, after running the Expert Advisor, switch to another profile in the terminal and then go back (to the old profile) and find that the chart has flushed like a cow.
My configuration:
When executing your code in the log I get only:
2016.02.11 20:14:01.996 Experts expert DeleteInd (XAUUSD,M1) loaded successfully
But after I switch to another profile and come back the window is absent (though quotes in it were changing after adding an Expert Advisor).
Does it mean that this is a bug? As far as I understand, the ChartIndicatorDelete() function should not lead to such abnormal behavior of a chart. Is it possible to fix it?
When I execute your code, I only get it in the logbook:
2016.02.11 20:14:01.996 Experts expert DeleteInd (XAUUSD,M1) loaded successfully
But after switching to another profile and coming back the window is absent (although quotes in it were changing after adding the Expert Advisor).
Does it mean that this is a bug? As far as I understand, the ChartIndicatorDelete() function should not lead to such abnormal behavior of a chart. Is it possible to fix it?
I made a switch. But what happened is the following: if I compile the mq4 file in the Experts folder, the program works only as an EA, as an indicator (when I copy it to the Indicators folder) it is not even set on the chart. But if I recompile it in this folder, everything is OK. The same goes for the EA, it will not be installed if it has been compiled in the Indicators folder. Please, tell me what is the reason for that? The compilation mode is strict, there are no errors.
In the latest build of MT5 1241 ChartIndicatorDelete function "messes up" the chart. The chart is not redrawn when resizing, the chart is not saved when closing the terminal, etc.
This has already been fixed. Please wait for the next build
Desk advised that there should be only one file,
Dear developers, could you advise whether recursion of class functions and methods is allowed in MQL? I'm making a recursive method call and getting a stack overflow.
Of course it's allowed. Otherwise you wouldn't get a stack overflow.
And what did you expect?
Do you control the recursion depth somehow?
Of course it's allowed. Otherwise you wouldn't get a stack overflow.
What did you expect?
Do you control the depth of recursion somehow?