Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1883

 
Artyom Trishkin #:

'Grey' means no source. No more than that.

No need to argue. I know what I'm talking about.

I'm not arguing. "Grey" is shown in the picture in this post.

Forum on trading, automated trading systems and testing trading strategies

Any questions from beginners on MQL4 and MQL5, help and discussion on algorithms and codes

Halina Okopna-Pecuch, 2022.01.24 10:43

Here is another picture

From the screenshot, you can see that some of theCustom indicators are present and some are available but not active.


Without sources these are


 
Alexey Viktorov #:

I'm not arguing. "The grey ones are shown in the picture in this post.


Without the sources, these are


These are different. I have these too and they just don't drag and drop on the chart, but the ones I'm asking about and I have in my MT4 folder - they're not there at all as in your case in the terminal navigator.

 
Halina Okopna-Pecuch #:

These are different. I have those too and they just don't drag and drop on the chart, but the ones I'm asking about and I have in my MT4 folder - they're not there at all as in your case in the terminal navigator.

Nah... I have the "grey ones" like in your picture in my navigator and they drag and drop and work without any problems.

You have to look for another reason.

 
Halina Okopna-Pecuch #:

Anyway, let's have a look at the files

 
Halina Okopna-Pecuch #:

These are different. I have those too and they just don't drag and drop onto the chart, but the ones I'm asking about and that I have in my MT4 folder - they're not there at all as in your case in the terminal navigator.

Try to move half of the indicators from the folder in your working directory to a separate folder outside of it. As a result, there will be less indicators and it will be easier for the terminal to download them. If I assume everything is correct, your indicators should appear. You can do the same with other robot applications and scripts and see what the result will be.

 
Halina Okopna-Pecuch #:

These are different. I have those too and they just don't drag and drop on the chart, but the ones I am asking about and have in my MT4 folder - they are not there at all as in your case in the terminal navigator.

No need to guess. Just delete unnecessary unnecessary indicators from the folder and the right ones will appear in the list in the terminal. You have hit the ceiling on their number in the folder.

 
Alexey Viktorov #:

I'm not arguing. "The grey ones are shown in the picture in this post.


Without the source material, these are the ones


Well I was talking about "these". When I had an overflow and the indicators weren't showing, I didn't look at what was shown in the menu that is shown in the screenshot in the post you mentioned. I can't say anything for sure here.

But if the indicators are not in the navigator, but they are in the folder, it means that the new ones won't show up in the navigator until some of the old ones are removed from the folder.

Been there, done that. I'm not the only one.

 

I wanted to circumvent the necessity to manually resize dynamic array simply by assigning it as an indicator buffer. But I can't get rid of ArrayResize() as if it were a dynamic array of indicator buffer whose size should be monitored by the terminal itself and which should not be resized manually:

https://www.mql5.com/ru/docs/series/bufferdirection:

Индикаторный буфер представляет из себя динамический массив типа double, размером которого управляет клиентский терминал с тем, чтобы он всегда соответствовал количеству баров, на которых индикатор рассчитывается. Обычный динамический массив типа double назначается в качестве индикаторного буфера с помощью функции SetIndexBuffer(). Для индикаторных буферов не требуется задавать размер с помощью функции ArrayResize(), исполняющая система терминала сама позаботится об этом.

We go to https://www.mql5.com/ru/docs/array/arrayisdynamic, run the code and suddenly find out that:

2022.01.24 21:25:27.543 t (NZDUSD,D1) 3. Checking the indicator buffer:

2022.01.24 21:25:27.543 t (NZDUSD,D1) Size before memory release = 7278

2022.01.24 21:25:27.543 t (NZDUSD,D1) This is dynamic array = None

2022.01.24 21:25:27.543 t (NZDUSD,D1) Size after memory release = 0

at the same time:

double ExtBuff[];      // индикаторный буфер
SetIndexBuffer(0,ExtBuff);

I look in the book - I see a fig. Or have we been deceived all this time?

Or maybe it's dynamic once (at first initialization) and then that's it?

 
x572intraday #:

I can't get rid of ArrayResize(), which is supposedly a dynamic array of indicator buffer whose size should be monitored by the terminal itself and which supposedly doesn't need to be resized manually:

https://www.mql5.com/ru/docs/series/bufferdirection:

We go to https://www.mql5.com/ru/docs/array/arrayisdynamic, run the code and suddenly find out that:

At the same time it:

I look in the book - I see a fig. Or have we been deceived all this time?

Or maybe it's dynamic once (at first initialization) and then that's it?

22:23:17.002 Dynamic EURCAD,H1: +============================+

0 22:23:17.002 Dynamic EURCAD,H1: 1. Checking a dynamic array:

0 22:23:17.002 Dynamic EURCAD,H1: Size before memory release = 100

0 22:23:17.002 Dynamic EURCAD,H1: This is Dynamic Array = Yes

0 22:23:17.002 Dynamic EURCAD,H1: Size after memory free = 0

0 22:23:17.002 Dynamic EURCAD,H1: 2. Static array check:

0 22:23:17.002 Dynamic EURCAD,H1: Size before memory free = 100

0 22:23:17.002 Dynamic EURCAD,H1: This is dynamic array = None

0 22:23:17.002 Dynamic EURCAD,H1: Size after memory free = 0

0 22:23:17.002 Dynamic EURCAD,H1: 3. Check indicator buffer:

0 22:23:17.002 Dynamic EURCAD,H1: Size before memory free = 2725

0 22:23:17.002 Dynamic EURCAD,H1: This is dynamic array = Yes

0 22:23:17.002 Dynamic EURCAD,H1: Size after memory release = 0

0 22:23:24.754 Dynamic EURCAD,H1: uninit reason 1

0 22:23:24.758 Custom indicator Dynamic EURCAD,H1: removed

This is at 4.

 
x572intraday #:

I wanted to circumvent the necessity to manually resize dynamic array simply by assigning it as an indicator buffer. But I can't get rid of ArrayResize() as if it were a dynamic array of indicator buffer whose size should be monitored by the terminal itself and which should not be resized manually:

https://www.mql5.com/ru/docs/series/bufferdirection:

We go to https://www.mql5.com/ru/docs/array/arrayisdynamic, run the code and suddenly find out that:

At the same time it:

I look in the book - I see a fig. Or have we been fooled all this time?

Or maybe it's one time dynamic (at first initialization) and then that's it?

yes, then that's it :-)

...after SetIndexBuffer it's impossible to use ArrayResize and from the viewpoint of the program, the array is static, with a predefined (externally controlled) size

Reason: