Errors, bugs, questions - page 622

 
Dima_S:
Very original)

and a few more additions.

If you create an indicator on the main chart, it handles the timer event successfully.
If you create an indicator on a chart object or from an EA placed on this object, the timer will not happen.

Anton explained me in SD that the timer availability property is copied from the chart thread from which the indicator is placed. There are no timers in the chart objects. They are present only in the main chart.

So, the timer indicator will only be available in the main chart and not in the chart object.

You must execute ChartIndicatorAdd in any case. So that the timer starts working.

 
Rosh:

Timer events are generated for the graph and from there to the programmes that run on it (thrown on top of it). This is the ideology - Program Execution:

That is why the indicator called from the Expert Advisor does not accept timer events. Try to apply the indicator to the chart using ChartIndicatorAdd function, will it change anything?

I think the timer would work as well as if you just threw an indicator on that chart. If there was only one chart, no problem.

We need to collect many charts with different currencies in one.

We will have to automate opening of a lot of small windows and loading them with "indicator" (for now).

Thanks for the wise replies, everybody.

 

Dima_S:

We'll have to automate opening a bunch of small windows and throwing an "inductor" on them (for now).

Why? You are catching by timer, so you don't need many windows. The only window with the indicator is enough. In this indicator, prescribe the handling of anything with any symbol. It's still on the timer, not the ticks.
 
sergeev:
Why? You're catching by timer, so you don't need many windows. One window with an indicator is enough. In this indicator, you can prescribe the handling of anything with any symbol. It's still on the timer, not the ticks.
The point is that ticks are also caught on many pairs - they form second counts and further they are sent through mapping to the EA for further processing)
 
Dima_S:
The point is that ticks are also caught by many pairs, from which second counts are formed and then they are sent via mapping to Expert Advisor for further perversion of processing)
Then it is easier to get the ticks from the indices to the Expert Advisor and save them until the next second count is received from a single timer (in the Expert Advisor), then form a second packet and clear the "accumulator".
 
Rosh:

Timer events are generated for the graph and from there to the programmes that run on it (thrown on top of it). This is the ideology - Program Execution:

Therefore, the indicator that is called from the Expert Advisor does not accept timer events. Try to apply the indicator to a chart in the Expert Advisor with the function ChartIndicatorAdd- will anything change?

Dima_S:

I think the timer will work the same way as when you simply throw the indicator on the chart. If I had only one chart, there would be no problem.

I should collect many charts with different currencies in one.

We will have to automate opening of a lot of small windows and loading them with "indicator" (for now).

Thanks to all for competent replies.

Taki, the timer has not worked itself with this sequence of calls from the Expert Advisor:

ChartOpen -> iCustom -> ChartIndicatorAdd

Charts have appeared and indicators have been added. The timer started working only after I manually call properties of each new chart and click OK without changes.

Is it a bug? A bug?

 
MetaDriver:
Then it's easier to get ticks into Expert Advisor from the inductors and save until the next second counts from a single timer (in Expert Advisor), then form a second batch and clear the 'hoarder.
It's not easier, it's more complicated. I've done it that way before)
 
Dima_S:

Taki, the timer didn't work itself with this sequence of calls from the Expert Advisor:

ChartOpen -> iCustom -> ChartIndicatorAdd

Charts have appeared and indicators have been added. The timer started working only after I manually call properties of each new chart and click OK without changes.

A bug? A bug?

Call OnTimer() in Inite.

 
Dima_S:
It's not simpler, but more complicated. I already did it that way).

Then we'll have to make it harder. :)

It's the only right way to do it anyway.

Judge for yourself. Even if you manage to start all timers (which is not a fact), and even if you manage to run them in strict synchronization (which is even more a fact), you'll still get information from them either sequentially, and in an unknown order (if there is one core) or close to it (if there are several cores). And then you have to keep track of the sequence and all that crap.

I suggest a compromise: you catch ticks by spies and send them immediately to the head Expert Advisor with a millisecond mark(GetTickCount()). Expert Advisor arranges them according to their labels and slices into second blocks.

It's not very simple, but it will be accurate.

 
Urain:
Call OnTimer() in the init.
You're about to get really mad... :))