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

 
voron_026:

If you don't mind my saying so. Could you please tell me exactly where in the code the calculation starts? It's hard to understand.

And if I understand correctly, then this part needs to be inserted into the EA code as a custom function?

I can't say, because there is no code. What you have presented is an executable file. The code file has the extension mq4.

 
Ihor Herasko:

I can't say as there is no code. What you have presented is an executable file. The code file has an extension mq4.

Got it. I am showing you the mql code

 
voron_026:

Got it. I'm sending you the mql code.

This is what you should include in your EA. Except without displaying graphical objects, if you don't plan to show them. Without any part of this code, nothing will work. Do not forget to include the premium_mt4.dll library. Without it, the program will not be able to get data from the clusterdelta website.

 
Ihor Herasko:

This is all that needs to be included in the EA.

Can it be done as a separate function?

Can we specify a buffer in the indicator code and connect to it through icustom?

 
voron_026:

Can it be done as a separate function? considering that the indicator's header content is written in the EA's header

Can you specify a buffer in the indicator code and connect to it through icustom?

The header is an advertisement for the codewriter, there is no need to include it.

Without looking at the code, I can assume that you can set the buffers and read them from the EA.

 
Alexey Viktorov:

I can assume that it is possible to set buffers and read them from the EA.

How to do it, if the indicator works through dll? To write the function for loading data from dll into the buffer?

Or I do not understand something wrong?

 
Alexey Viktorov:

Without looking at the code, I can assume that you can set buffers and have them read from the EA.

It's a mistake not to look at the code. Buffers cannot be used there in principle. It is a market profile - horizontal lines, which theoretically can be unlimited, and the number of buffers is limited to 512. Yes, of course, this amount may be enough, but why occupy memory for the entire history depth several tens of times, if we need to display data for one day?

 
voron_026:

How to do it, if the indicator works through dll? Write the function of uploading data from dll to the buffer?

Copy the description of the DLL into the Expert Advisor. This is the easiest part of the task. And do not forget about the availability of this DLL, when you will transfer the Expert Advisor.

Next, we need to distribute the data on the appropriate functions of the EA (rewrite part of the OnInit indicator in the OnInit EA, etc.), add the tuning parameters to the EA, so it will be possible to adjust the indicator, remove the graphical output and, most importantly, decide how the data will be transferred for use in the EA. No one will decide this for you, because you don't know how these data will be used further.

 
Ihor Herasko:

Copy the DLL description into the EA. This is the easiest of the task. And do not forget about the availability of this DLL, when you will transfer the EA.

Next, we need to distribute the data on the appropriate functions of the EA (rewrite part of the OnInit indicator in the OnInit EA, etc.), add the tuning parameters to the EA, so that we can customize the indicator, remove the graphical output and, most importantly, decide how the data will be transferred to be used in the EA. No one will decide this for you, because you don't know how these data will be further used.

I got you. Thank you very much! I will be working.

 
Ihor Herasko:

It is very wrong not to look at the code. Buffers cannot be used there in principle. It is a market profile - horizontal lines, which theoretically can be unlimited, and the number of buffers is limited to 512. Yes, of course, this number might be enough, but why take up memory for the whole depth of history several tens of times, if you need to display data for one day?

Well, then, laziness was born before us. :))) And I didn't assert that all graphic elements can be replaced by indicator buffers. Just in this case, we must understand how many lines of all created lines are taken into account in decision making. And accordingly, you can try to do with the least number of buffers.