is It True that ...

 

.. this does not work as the ArraySize is zero:

//within OnInit() of an indicator:

         int i=0;
         SetIndexBuffer(i,Buff_A);
         SetIndexStyle( i,DRAW_LINE,STYLE_SOLID,1);
         SetIndexLabel( i,"EmaFast");
         i++;
         SetIndexBuffer(i,Buff_Ta1);
         SetIndexStyle( i,DRAW_NONE,STYLE_SOLID,1);
         SetIndexLabel( i,"EmaFast Tmp1");
         i++;
         SetIndexBuffer(i,Buff_Ta2);
         SetIndexStyle( i,DRAW_NONE,STYLE_SOLID,1);
         SetIndexLabel( i,"EmaFast Tmp2");
...

 and this

Comment("b: ",b,"  sz: ",ArraySize(Buff_FA),"  Hi[b] ",DoubleToString(High[b]));

shows:


Is there no way to automate the buffer indices?

I get the error 4051 = ERR_INVALID_FUNCTION_PARAMVALUE??

BTW I tried to use char, uchar, short, ushort, .. and even 1 ?

Now I have found it - if I use 0 it works 1 or and variable does not :(

//   #############      Problem solved    ########## //

As I was installing my oop-indi in an indicator (copied from a script and an EA) I forgot to set the initial Indi.-stuff:

#property  indicator_chart_window

#property  indicator_buffers 13
#property indicator_color1  clrYellow //fast
#property indicator_color2  clrNONE  //slow
#property indicator_color3  clrNONE   // high
#property indicator_color4  clrAqua   // low


Now even i++ works perfect!

Sorry

 
gooly: .. this does not work as the ArraySize is zero:
SetIndexBuffer(i,Buff_A);
SetIndexBuffer(i,Buff_Ta1);
SetIndexBuffer(i,Buff_Ta2);
Comment("b: ",b,"  sz: ",ArraySize(Buff_FA),"  Hi[b] ",DoubleToString(High[b]));
Of course the size is zero, you never made Buff_FA a buffer.
 
WHRoeder:
gooly: .. this does not work as the ArraySize is zero:
Of course the size is zero, you never made Buff_FA a buffer.
That was only my typo in this post. There were 13 buffers and both (Buff_FA and Buff_A) as the remaining 11 suffered from the same problem.
Reason: