Event stream. How to control and make the event idle ? (+ solved) - page 4

 
Yedelkin:

Thanks, I already have everything optimised there :) Including with this article in mind, as far as I remember. I'll have to wait for the next degree of enlightenment :)

Is it possible to determine the Expert Advisor and indicator separately, if they work together via custom events?

You have not read it well. That article provides a methodology, you can develop it.
 
Rosh:
You haven't read it well. There is a methodology in that article, you can elaborate on it.
Well, it's not hard to check your claim.
 
sergeev:

here is my particular case, which I started by demonstrating the non-rejection of identical events

https://www.mql5.com/ru/forum/5091#comment_112780

I also wrote there why the overflow occurs.

I'll read the topic later.

sergeev:

Yes, yes, EventChartCustom is not inside OnChartEvent, but, like, outside. Now look at your own code:

void OnChartEvent(int iview, int id, long lparam, double dparam, string sparam)
{
    if (id==CHARTEVENT_CUSTOM+VM_IDLE)
    {
      ... 
    }
    EventChartCustom(m_chart, VM_IDLE, (long)event_idle, 0, ""); // отправили событие с указанием последнего счетчика 

Get to the root of it! I showed a demonstration of the problem and its solution. This EventChart call could be anywhere in the code.

Well I said "that in this code EventChartCustom is not insideOnChartEvent, and I am very wrong" :)

 
Rosh:
You haven't read it well.

Reread. The statement is unfounded. The answer to the question "How much does an Expert Advisor and indicator consume separately, if they are working in tandem through custom events" is missing in the article.

Rosh:
That article just gave a methodology, you can develop it.

The methodology is described at the beginning of the article. It is referenced in the middle of the article. The methodology consists in the comparison of the running times of Expert Advisors addressing a particular indicator. (By the way, I remembered that I was not guided by the article - I managed to avoid intersections with described problems at the development stage).

My question is not about how to determine the testing speed of Expert Advisor/indicator, but how to determine how much (what RAM volume) an Expert Advisor and an indicator consume separately, if they (1) simultaneously work in tandem and (2) simultaneously work by sending/receiving custom events. I.e. we are talking about a situation, when an Expert Advisor simultaneously displays trading activity, while the indicator - calculating activity. I can only see the total size of RAM consumed by the terminal with an Expert Advisor running on it in Task Manager. But how can I know the distribution of this size between the Expert Advisor and the indicator?

 

Yedelkin:

how to determine how much (how much RAM volume) is consumed by the Expert Advisor and the indicator separately.

how to know the distribution of this capacity between the Expert Advisor and the indicator, and is it possible to find out?

I'm embarrassed to ask - why do I need to know that? (this is not a rhetorical question, but a very practical one)
 
Yedelkin:

Yep... With that attitude towards the responders...

Yourself. Onward and upward.

 
sergeev:
I am even embarrassed to ask - why do you need to know that? (It's not a rhetorical question, it's a practical one)
The answer is also applicable :) If the Expert Advisor+indicator scheme described above starts consuming too much RAM and the user event thread seems to have nothing to do with it, I want to know where to look for the problem - in the Expert Advisor or in the indicator. It is desirable to determine which program is responsible for memory consumption.
 
TheXpert:

Yep... With that attitude towards the responders...

Yourself. Go ahead and sing.

Did I offend you in particular? - I'm sorry. The attitude towards all responders is the most positive. You must be imagining things... I check and evaluate every argument. I am far from your occasional harshness in any case. That is why I suggest you not to turn the topic to personal relations.

 
Yedelkin:
Did I hurt you in particular? - I am sorry. I have the most positive attitude to everyone who answers. I check and evaluate every argument. I am far from your occasional harshness in any case.

Your behaviour is simply reminiscent of the boat and helicopter joke :)

Righteous Moesha had prayed to God all his life and trusted in him. Then, one day, there was a flood in the town where he lived.
Moisha immersed himself in prayers for salvation and meanwhile the water rose to the middle of the ground floor.
His friends were passing by in a boat:
-Sit down, Moisha, we will save you.
- No, replied Moisha, God will save me.
Meanwhile, the water had reached the middle of the first floor.
A log floated by - Moyshe's acquaintances were on it:
- Sit down, Moyshe, we will save you.
- No, said Moesha, God will save me, and he continued to pray.
Meanwhile, the water had risen all the way to the roof where Moishe was sitting,
a helicopter flew up and his comrades lowered down a rope ladder:
- 'Get in, Moisha, we'll save you,
- No,' replied Moyshe, 'God will save me' - and continued to pray. Then the water rose above the roof and Moyshe drowned.
So Moisha stood before the Lord:
- Why didn't you help me? - Moesha asked the Lord reproachfully,
- I have put so much faith in you, I have prayed to you, I have waited so much for your help!
- And who," says the Lord, "sent you a boat, a log and a helicopter?

 
Rosh:

It's just that your behaviour reminds me of the boat and helicopter joke :)

OK, I see.TheXpert made a fuss and here we go.

I conclude that the answer to the second block of questions (about separate estimation of memory consumption by programs running together) is missing. Thanks for answering the first set of questions!