[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 423

 
hoz:

If each buffer (each line) has its own parameters (colour, thickness, etc.), then how will these parameters be transferred to each line?
It is possible to pass individual properties for each line, but is it necessary with so many lines? Let there be one property for all lines.
 
Zhunko:
It is possible to transfer individual line properties, but is it necessary with so many lines? Let's have one property for all the lines.


That is, I understand correctly. If some lines have the same properties, and there are 8 properties for all features, then you can fit them all in one index, but if there are more than 8 properties, then you can't?
 
hoz:

So my understanding is correct. If some lines have the same properties, and there are 8 properties for all attributes, then you can fit them into one indicator, but if there are more than 8 properties, then you can't?
Any number of properties can be transferred.
 
Zhunko:
Any number of properties can be transferred.


But properties are bound to a buffer if they are needed to visually display a graphical object. So it is not possible to exceed the number of properties above 8. Is this correct?
 
hoz:

But properties are bound to a buffer if you need them to visually display a graphical object. So it is not possible to exceed the number of properties above 8. Is it correct?

I guess I don't understand the question.

Do you mean that the number of line properties is only 8?

 
hoz:

If each buffer (each line) has its own parameters (colour, thickness, etc.), then how will these parameters be passed to each line?

You mean through iCustom() into the EA? I put the same computational block there, and that's all. If for some reason it does not work (so far I have encountered only recursion by time series), it is better to create an indicator buffer and call it through iCustom().


I mean if the indicator is drawn with trend lines. But it doesn't matter if it is in a subwindow, WindowOnDropped at start under the flag, the flag is omitted. Like this:

int start(){
   //блок рисования горизонтальных линий уровня. Не выношу в init(), потому что WindowOnDropped() определён только в start()
   if(image){
      if(b){
         for(int i=-100; i<=100; i++){
            double x=i; x/=100; double hue=SpectralFilter(x, focus);
            color RGB=HSLtoRGB(hue, Staturation, Lightness);
            string name=DoubleToStr(hue,8);
            ObjectCreate(name,OBJ_HLINE,WindowOnDropped(),0,hue);
            ObjectSet(name, OBJPROP_COLOR, RGB);
            ObjectSet(name, OBJPROP_STYLE, STYLE_SOLID);
            ObjectSet(name, OBJPROP_WIDTH, 1);
         }
         b=false;
      }
   }else{
      ObjectsDeleteAll(WindowOnDropped(),OBJ_HLINE);
   }

Trends are drawn in the same way.

 
Zhunko:

I guess I don't understand the question.

Do you mean that the number of line properties is only 8?


No. You said it yourself:

Zhunko:
Any number of properties can be transferred.


But you don't mean just properties in aggregate. But to each displayed line or object of any other graphic. Because it is written in the documentation https://docs.mql4.com/ru/customind/IndicatorBuffers:

So it turns out that if the properties are passed through the buffer in the terminal window, then you cannot pass more than 8 graphical objects, based on the documentation. But I've seen before the indices, almost rainbows, where colours and lines exceed 8. So, somehow they work around this limitation...

 
gyfto:

Do you mean through iCustom() into the EA? I put the same computational block there, and that's all. If for some reason it does not work (so far I have encountered only recursion by timeseries), it is better to form the indicator buffer and call it through iCustom().

No, I mean it must be drawn from the indicator and that is all. I do not want to transfer it to an Expert Advisor. I need it to visually control some moments and nothing more.

gyfto:

I mean if a trend line is drawn in an indicator. But it doesn't matter if it's in a subwindow, WindowOnDropped in the start under the flag, the flag is omitted. Like this:

The trend lines are drawn in the same way.


Do you mean to run the same inductor in a different window, specifying a different window, and thus bypass the restriction?
 
hoz:


But I've come across turkeys before, almost rainbows, where the colours and lines are much more than 8. So somehow they get around this restriction...


Well, in idea, if additional indicator buffers are declared by themselves, and further by trend lines, it will work...
 
hoz:
Do you mean to run the same tool in another window, specifying a different window, and thus bypass the restriction?

No, I'm talking about ObjectCreate(), the window number must be set there. I showed you how to set it if it is a sub-window (i.e. not zero, which is the main window).
Reason: