
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
It's always a good idea to check values, but
period can't be 0.
Ah, good point, I always use brackets to make this kind of stuff clear, it makes me lazy (efficient) though and I miss stuff like this . . .
I wonder if the period is greater than the number of Bars available it will cause the issue . . .
Sorry, should have made this more clear:
the code I posted is just some random, not doing anything piece of code, that I simply wrote to show you the error.
In my EA, there are way more checks (enough bars, Period reasonable, Terminal connected, ...)
Here, my idea was just to show the most simple code, that allows to reproduce my memory troubles, to let others check, if they get it too.
Clock
Hi,
The below code suggests that the removal of indicator fails producing error 4014 ("System function is not allowed to call") , so maybe that is causing excessive memory usage:
Oh! Never thought about checking the outcome of the IndicatorRelease function.
So now I know what might cause the memory usage. The question is: why can't I release it?
Thanks for the input!
Oh! Never thought about checking the outcome of the IndicatorRelease function.
So now I know what might cause the memory usage. The question is: why can't I release it?
Thanks for the input!
You have to read the replies when you post a question then
Forum
Re-initialization of an indicator
angevoyageur, 2013.07.03 13:57
This approach seems correct, but you have to check the returned value of IndicatorRelease(). If you need more help you have to provide some snippets of codes that reproduce your issue AND compiles.Well, you got me. I have to admit, that I didn't really get that hint of yours. Guess that's caused by my lacking english skills...
However, why do you say that this is not the problem? Of course checking the returned value does not solve the memory issue, but it raises the question: why can't the handle be released? And would I have the same issues, if it was released properly (probabaly not?). But then again: little to no idea, how I will find the source of this newly found problem...
Well, you got me. I have to admit, that I didn't really get that hint of yours. Guess that's caused by my lacking english skills...
However, why do you say that this is not the problem? Of course checking the returned value does not solve the memory issue, but it raises the question: why can't the handle be released? And would I have the same issues, if it was released properly (probabaly not?). But then again: little to no idea, how I will find the source of this newly found problem...
Does anybody have any hints, on why IndicatorRelease might fail? Not just in this example, but overall.
Started to use that check in different places, and more often than not, I get a fail...
What I didn't check yet, and what makes it even funnier, is that this code works flawlessly.
So without trying to free memory through IndicatorRelease(), there's no problem...