Discussing the article: "Creating multi-symbol, multi-period indicators" - page 3

 
Denis Kirichenko #:

To test something, you have to be in the paradigm of what's going on ))

I realised that it's easier for me to sketch my own version, as I'm not close to the current approach. In particular, it seems to me that the CIndMSTF class is some kind of super class. Then a bunch of indicator classes are created on its basis. Creepy - the IndMSTF.mqh file is 4 thousand lines of code )) I went the way of using an instance of CIndicators class as an indicator collection. It is very convenient. You don't need to reinvent the wheel...

Then why should the CIndMSTF class store data on buffers (SBuffer m_buffers[])? We calculated them once in OnCalculate() and that's enough. I.e. we took it as a parameter by reference, calculated it and gave it to you...

I'll write more later about what I disagree with when I finish my version...

Yes, liked that there is this mechanism:

Because of the extensibility - so that once calculated data is in a separate array from the calculation part. CopyBuffer copies a given number of bars into the array and resizes the receiving array to fit the copied amount of data. I.e., if you need data all the time, you need to copy them from the buffer of the calculation part all the time.

Here we have made it so that there is a constantly filled array with all the data, and the data are obtained from it by index. Without copying. Copying is done once at startup, and then only adding data two bars at a time to the end of the list. I think the same logic is used in SB in the class you mentioned. I may forget and be wrong about it.

 
Artyom Trishkin #:

Because of the extensibility - to keep the calculated data in a separate array from the calculation part. CopyBuffer copies a specified number of bars into the array and changes the size of the receiving array to fit the copied amount of data. I.e., if you need data all the time, you should copy it from the calculation part buffer all the time.

Here we have made it so that there is a constantly filled array with all the data, and the data are obtained from it by index. Without copying. Copying is done once at startup, and then only adding data two bars at a time to the end of the list. I think the same logic is used in SB in the class you mentioned. I may forget and be wrong about it.

Yes, there is array filling. But there is also an attempt of direct access - the api-method CIndicator::GetData(), which calls the native function CopyBuffer() head-on.

 
100 errors, 6 warnings 100 7. Why 100 errors when compiling. What am I doing wrong?

 
StohanoV #:
100 errors, 6 warnings 100 7. Why 100 errors when compiling. What am I doing wrong?

The very first error in the editor's log is what?

Reason: