Reading indicator buffers set to chart - page 4

 
comp:
When writing a test Expert Advisor with iCustom, I faced an unsolvable MQL problem. To know the file name (see the code) of the indicator and the values of its input parameters - no problem. But after that it is impossible to insert the indicator's input parameters into iCustom. The way iCustom is called is that a universal solution for any indicator is suitable only in the case of the default input parameters. Otherwise we have to go into the code. This solution is not convenient. We could pass the indicator inputs as a structure with the appropriate string-fields. But we used the ellipsis, which killed the universality of the call. Another strange restriction!

You have now perverted absolutely everything. I have written above about your problem.

Underlined are contradictory talking points.

 
comp:

It's like a hammer to the head to make a statement like that

...

Does anyone use event model + OOP in indicators?

Take care of your head, especially on the forums. I use OnChartEvent more often in indicators than in robots. The timer is needed much less frequently, but it is used in both indicators and bots. I don't know why I need a script to read indicator buffers on the chart, it's hard to think :)
 
Dmitry Fedoseev:
What for? Everything has been already stolen there, there is the function OnCalculate - event of the coming tick. If you want to use OOP - use it, but what for is it there, where to put it?

Why indeed? A search turned up several videos with examples that could be used to explain

Video from the article.

More

and more.

And these are simple examples of using the event model. Which can be universally implemented through the same OOP. Buffers and indicators, for example, are inherited classes. When I move graphical objects (also implemented through OOP + events) on the chart, indicators change accordingly. Not static indicators come out. And thanks to OOP they are written in a few lines.

 
Alexander Puzanov:
Why a script might need to read the indicator buffers on a chart is hard to think of :)
The problem is this. There are two such lively indicators. I need to determine the moment when average difference between them reaches a certain threshold (here we need to know how to do it in the same Expert Advisor). And at that moment to dump their values into a file for further analysis. Or if not to reset, then at least to send a signal to the indicator, so that they froze in this state.
 
Dmitry Fedoseev:

You have now perverted absolutely everything. I have written above about your problem.

Underlined are contradictory talking points.

I didn't see a contradiction. Suppose we want to create our own toolbar similar to CTRL+D. Suppose we want to work only with primitive classic indicators.

If you apply indicators to a chart without changing default input parameters, this custom panel will work because iCustom allows making universal calls for default inputs.

But as soon as you change it, it will fail. The Expert Advisor will know all values of the indicator input parameters on the chart. But it will not be able to call iCustom with them. What a mystery!

 
comp:

...

But as soon as you change it - bummer. And the Expert Advisor will know all values of indicator input parameters on the chart. But it will not be able to call iCustom with them. What a mystery!

Why won't the Expert Advisor be able to call it? Yes, it can.
 
Dmitry Fedoseev:
Why can't the councillor summon? He can.
It would be good to add some constructiveness.
 
comp:
It would be nice to add some constructiveness.
And who here persists in writing nonsense?
 
Dmitry Fedoseev:
And who here persists in writing nonsense?

I don't know.

I confirmed my original statements in code. You haven't.

 
comp:

I don't know.

I confirmed my original statements in code. You have not.

What statements? The statement in the header is incorrect. There are no problems with reading the buffers. What's the problem with - I wrote, and I also gave a link to this post. Should I still run after you and force you into it?