Errors, bugs, questions - page 1668

 
BlackTomcat:
I remember, the documentation says that it's better to initialize (create) indicators handles in the OnInit function, and perform IndicatorRelease in the OnDeinit function. This means that all the time while the Expert Advisor is running, the indicators handles remain relevant.

Not just up to date, but recalculated (well, or pulling in data for recalculation)! This is why it always makes sense to do IndicatorRelease if you know 100% that you won't need it again. And this can happen far before OnDeinit.

For example, if you call an indicator with randomized input parameters every time, then there's no point in not doing IndicatorRelease.

 
fxsaber:

Not just up to date, but recalculated (well, or pulling in data for recalculation)! This is why it always makes sense to do IndicatorRelease if you know 100% that you won't need it again. And this can happen far before OnDeinit.

For example, if you call an indicator with random input parameters every time, there's no point in not doing IndicatorRelease.

If your algorithm implies the constant change of indicator parameters, then yes, you're right. But if you don't do it, then the expenses of machine resources for recalculation are much less than for the creation of a "new" indicator + the old one was "killed" before. As I understand it, this was the point Renat was trying to make.
 
BlackTomcat:
If your algorithm implies constant change of indicator parameters, then yes, you are right. But if it doesn't happen in fact, then the cost of machine resources for recalculation is many times less than the cost of creating a "new" indicator + the old one was "killed" before. As I understand it, this is the idea that Renat was trying to convey.
Yes, it's better to make a universal repository, as it is implemented by developers in MT4.
 
fxsaber:

IndicatorRelease after iCustom should be done?


Why?

You don't. You don't need to do it after IndicatorCreate either

 
Slawa:

What for?

Don't. Don't do after IndicatorCreate either

After does not mean right away. But if not, when should it be done?
 
Is it possible to find out all indicator handle numbers that work in the terminal - not only IndicatorCreate+ChartIndicatorAdd, but also IndicatorCreate-only?
 
How can I check if an indicator handle is "dead"? For example, I made IndicatorCreate and someone else made it IndicatorRelease.
 
fxsaber:
How can I check if an indicator handle is "dead"? For example, I made IndicatorCreate and someone else made it IndicatorRelease.
I think that in this case the indicator handle reference count will be decreased by one, but the indicator itself will continue to be active.
 
BlackTomcat:
I think that in this case the indicator handle reference counter will be reduced by one and the indicator itself will continue to be active.
What is the counter?
 
Renat Fatkhullin:
This mistake will be corrected in the next few days. We overdid it with protection.
Renat Fatkhullin:
We will also enable automatic saving of text while typing, so that after a crash or a browser crash we could continue

When should we expect all this happiness?

.