Questions from Beginners MQL5 MT5 MetaTrader 5 - page 468

 
Alexey Viktorov:

There is value in both the zero and the first buffer. On M15 the fractals are now at 5m and 21m bars. This script

finds and prints everything correctly. Correspondingly, the Expert Advisor will find iCustom() working equally in the script and in the Expert Advisor.

But the Expert Advisor does not find it. And the log contains solid zeros.
 
Maxim Dobrovolskii:
indicator code.

Check what is i?

Just put Print(). That seems to be the problem.

 
Maxim Dobrovolskii:
I can't find anything in the EA, and the log is full of zeros.
Tomorrow I'll show you that the EA sees everything, too.
 
Alexey Viktorov:
Tomorrow I'll show you what the councillor sees too.
The advisor does not. The indicator needs to be fixed first
 
Victor Nikolaev:

Check what is i?

Just put Print(). That seems to be the problem

Thank you, yes, there is something strange going on in i. I'll have to check it out.
 
Victor Nikolaev:
The EA doesn't. First the indicator has to be fixed.

Why does the script see it?

Of course it is possible that it does not update, but this is not the reason we were talking about in the first place.

 
Alexey Viktorov:

Why does the script see it?

Of course it is possible that it is not updating, but that is not the reason we are talking about in the first place.

Both the script and the Expert Advisor see the past. Neither of them sees the present. The indicator does not show it. That is why they cannot see it.
 
Victor Nikolaev:
Both the script and the advisor see the past. But neither can see the present. The indicator does not show it. That's why they can't see it.
I was too lazy to launch the tester. Yes, it does not update and consequently buffers are not filled.
 
Victor Nikolaev:
Both the script and the advisor see the past. But neither can see the present. The indicator does not show it. That is why they cannot see it.
So, in my case it goes from 1001 bars in the past to the current bar in the present. But the values that are put in the buffer do not coincide with those that are drawn on the chart by the indicator separately, and those that are put in the buffer I cannot find at all on the chart.
 
Maxim Dobrovolskii:
So, in my case it goes from 1001 bars in the past to the current bar in the present. However, the values that it puts in the buffer do not coincide with those that the indicator draws separately on the chart, and I cannot find any values that it puts in the buffer on the chart at all.
The indicator doesn't put anything in the buffer on new bars... You have to refresh the chart to see it correctly. I asked you to check what i equals. Although it can only be done tomorrow
Reason: