Issues with seeing all my buffers and using both chart window and seperate window

 
i am trying to get  my indicator i made work  but i have a lot of buffers  18 to be exact .  
with #property Strict everything compiles fine no errors and no warnings.   but  when i load into terminal  i only see the first buffer  
i am still new to coding.   

#property indicator_chart_window
#property indicator_buffers 18
#property indicator_color1 Purple
#property indicator_width1 2
#property indicator_color2 Purple
#property indicator_width2 2
#property indicator_color3 DarkGray
#property indicator_width1 2
#property indicator_color4 DarkGray
#property indicator_width2 2
#property indicator_color5 DeepSkyBlue 
#property indicator_color6 DeepSkyBlue 
#property indicator_color7 Red
#property indicator_color8 Red
#property indicator_color9 Yellow
#property indicator_color10 Yellow
#property indicator_color11 Purple
#property indicator_color12 Purple
#property indicator_color13 Purple
#property indicator_color14 Silver
#property indicator_color15 Silver
#property indicator_color16 Aqua
#property indicator_color17 Blue
#property indicator_color18 Red
that is my indicator list. 

my buffer indicators are here 
//---- indicator buffers
double ExtMapBuffer[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
double FP_BuferUp[];
double FP_BuferDn[]; 
double NP_BuferUp[];
double NP_BuferDn[]; 
double HP_BuferUp[];
double HP_BuferDn[];
double ExtMapBuffer5[];
double ExtMapBuffer6[];
double ExtMapBuffer7[];
double ExtMapBuffer8[];
double ExtMapBuffer9[];
double ExtMapBuffer10[]; 
double ExtMapBuffer11[];
double ExtMapBuffer12[];
double spread;
static    double    tsig=0;

int F_Period;
int N_Period;
int H_Period;
int Dev1;
int Stp1;
int Dev2;
int Stp2;
int Dev3;
int Stp3;
and below is my  

INT section 

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
  // --------- Math Cell values for  alert 
   if (Period1>0) F_Period=MathCeil(Period1*Period()); else F_Period=0; 
   if (Period2>0) N_Period=MathCeil(Period2*Period()); else N_Period=0; 
   if (Period3>0) H_Period=MathCeil(Period3*Period()); else H_Period=0; 
   
   IndicatorBuffers(4);
//---- drawing settings
   SetIndexStyle(0,DRAW_ARROW);
   SetIndexArrow(0, 233);
   SetIndexStyle(1,DRAW_ARROW);
   SetIndexArrow(1, 234);
   SetIndexStyle(2,DRAW_ARROW);
   SetIndexArrow(2, 233);
   SetIndexStyle(3,DRAW_ARROW);
   SetIndexArrow(3, 234);
   SetIndexStyle(11,DRAW_LINE,EMPTY,1,indicator_color11);
   SetIndexStyle(12,DRAW_LINE,EMPTY,1,indicator_color12);
   SetIndexStyle(13,DRAW_LINE,EMPTY,1,indicator_color13);
   SetIndexStyle(14,DRAW_LINE,EMPTY,1,indicator_color14);
   SetIndexStyle(15,DRAW_LINE,EMPTY,1,indicator_color15);
   SetIndexStyle(16,DRAW_LINE,EMPTY,1,indicator_color16);
   SetIndexStyle(17,DRAW_ARROW);
   SetIndexBuffer(17,ExtMapBuffer11);
   SetIndexArrow(17,233);
   SetIndexEmptyValue(0,0.0);
   SetIndexStyle(18,DRAW_ARROW);
   SetIndexBuffer(18,ExtMapBuffer12);
   SetIndexArrow(18,234);
   SetIndexEmptyValue(1,0.0);
   spread=MarketInfo(Symbol(),MODE_SPREAD)*Point;
   SetIndexDrawBegin(0,0);

//---- indicator buffers mapping
   SetIndexBuffer(0,ExtMapBuffer);
   SetIndexBuffer(1,ExtMapBuffer2);
   SetIndexBuffer(2,ExtMapBuffer3);
   SetIndexBuffer(3,ExtMapBuffer4);
   SetIndexBuffer(11,ExtMapBuffer5);
   SetIndexBuffer(12,ExtMapBuffer6);
   SetIndexBuffer(13,ExtMapBuffer7);
   SetIndexBuffer(14,ExtMapBuffer8);
   SetIndexBuffer(15,ExtMapBuffer9);
   SetIndexBuffer(16,ExtMapBuffer10);
   SetIndexEmptyValue(0,0.0);     
//---- indicator short name
   IndicatorShortName("blahblah1("+Ext2th+","+ExtDev4+","+ExtBack1+")");
   IndicatorShortName("blahclah2("+Ext2th2+","+ExtDev2+","+ExtBack2+")");
   return(0);
   
//---- Peroid 1  
   if (Period1>0)
   {
   SetIndexStyle(5,DRAW_ARROW,0,1); 
   SetIndexArrow(5,Symbol_1_Kod); 
   SetIndexBuffer(5,FP_BuferUp); 
   SetIndexEmptyValue(5,0.0); 
   
   SetIndexStyle(6,DRAW_ARROW,0,1); 
   SetIndexArrow(6,Symbol_1_Kod); 
   SetIndexBuffer(6,FP_BuferDn); 
   SetIndexEmptyValue(6,0.0); 
   }
   
//---- Peroid 2 
   if (Period2>0)
   {
   SetIndexStyle(7,DRAW_ARROW,0,2); 
   SetIndexArrow(7,Symbol_2_Kod); 
   SetIndexBuffer(7,NP_BuferUp); 
   SetIndexEmptyValue(7,0.0); 
   
   SetIndexStyle(8,DRAW_ARROW,0,2); 
   SetIndexArrow(8,Symbol_2_Kod); 
   SetIndexBuffer(8,NP_BuferDn); 
   SetIndexEmptyValue(8,0.0); 
   }
//---- Period 3 
   if (Period3>0)
   {
   SetIndexStyle(9,DRAW_ARROW,0,4); 
   SetIndexArrow(9,Symbol_3_Kod); 
   SetIndexBuffer(9,HP_BuferUp); 
   SetIndexEmptyValue(9,0.0); 

   SetIndexStyle(10,DRAW_ARROW,0,4); 
   SetIndexArrow(10,Symbol_3_Kod); 
   SetIndexBuffer(10,HP_BuferDn); 
   SetIndexEmptyValue(10,0.0); 
   }
   
// math for 3 alert
   int CDev=0;
   int CSt=0;
   int Mass[]; 
   int C=0;  
   if (IntFromStr(Dev_Step_1,C, Mass)==1) 
      {
        Stp1=Mass[1];
        Dev1=Mass[0];
      }
   
   if (IntFromStr(Dev_Step_2,C, Mass)==1)
      {
        Stp2=Mass[1];
        Dev2=Mass[0];
      }      
   
   
   if (IntFromStr(Dev_Step_3,C, Mass)==1)
      {
        Stp3=Mass[1];
        Dev3=Mass[0];
      }      
   return(0);    
   
  }
//+---

i have made another indicator that has a total of 7 buffers  and i know this is the max limit of INDEX index can only be at range of 1-7  but i don't know what to do to make all of my 18 buffers on this set of code.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
question 2 
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
my other question is 
how do i enable both  

#property indicator_chart_window

and 

#property indicator_separate_window

On the same indicator .mq4   

example 

buffers  1-4 should be on Chart window 

buffers 5-8 should be on Separate Window


i  have tried to search for my answer through the forum and through the online book but i can't find a clear example on how to execute this code because i am also very new to coding still 

 
Ricks creations:

buffers  1-4 should be on Chart window 

buffers 5-8 should be on Separate Window

Can't be done. Write two separate indicators.
 
William Roeder #:
Can't be done. Write two separate indicators.
what can't be done?  having  one  indicator file do both    Chart window and Separate window.   or    using all 18 buffers  on one  indicator ?   

please clarify what can't be done or both of these can not be done?  
thanks for the response @william 
 
Ricks creations #: what can't be done? 
You must:
Either you specify
#property indicator_chart_window
or you specify
#property indicator_separate_window
 

how about my other question 


i am trying to get  my indicator i made work  but i have a lot of buffers  18 to be exact .  
with #property Strict everything compiles fine no errors and no warnings.   but  when i load into terminal  i only see the first buffer  
i am still new to coding.   

#property indicator_chart_window
#property indicator_buffers 18
#property indicator_color1 Purple
#property indicator_width1 2
#property indicator_color2 Purple
#property indicator_width2 2
#property indicator_color3 DarkGray
#property indicator_width1 2
#property indicator_color4 DarkGray
#property indicator_width2 2
#property indicator_color5 DeepSkyBlue 
#property indicator_color6 DeepSkyBlue 
#property indicator_color7 Red
#property indicator_color8 Red
#property indicator_color9 Yellow
#property indicator_color10 Yellow
#property indicator_color11 Purple
#property indicator_color12 Purple
#property indicator_color13 Purple
#property indicator_color14 Silver
#property indicator_color15 Silver
#property indicator_color16 Aqua
#property indicator_color17 Blue
#property indicator_color18 Red
that is my indicator list. 

my buffer indicators are here 
//---- indicator buffers
double ExtMapBuffer[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
double FP_BuferUp[];
double FP_BuferDn[]; 
double NP_BuferUp[];
double NP_BuferDn[]; 
double HP_BuferUp[];
double HP_BuferDn[];
double ExtMapBuffer5[];
double ExtMapBuffer6[];
double ExtMapBuffer7[];
double ExtMapBuffer8[];
double ExtMapBuffer9[];
double ExtMapBuffer10[]; 
double ExtMapBuffer11[];
double ExtMapBuffer12[];
double spread;
static    double    tsig=0;

int F_Period;
int N_Period;
int H_Period;
int Dev1;
int Stp1;
int Dev2;
int Stp2;
int Dev3;
int Stp3;
and below is my  

INT section 

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
  // --------- Math Cell values for  alert 
   if (Period1>0) F_Period=MathCeil(Period1*Period()); else F_Period=0; 
   if (Period2>0) N_Period=MathCeil(Period2*Period()); else N_Period=0; 
   if (Period3>0) H_Period=MathCeil(Period3*Period()); else H_Period=0; 
   
   IndicatorBuffers(4);
//---- drawing settings
   SetIndexStyle(0,DRAW_ARROW);
   SetIndexArrow(0, 233);
   SetIndexStyle(1,DRAW_ARROW);
   SetIndexArrow(1, 234);
   SetIndexStyle(2,DRAW_ARROW);
   SetIndexArrow(2, 233);
   SetIndexStyle(3,DRAW_ARROW);
   SetIndexArrow(3, 234);
   SetIndexStyle(11,DRAW_LINE,EMPTY,1,indicator_color11);
   SetIndexStyle(12,DRAW_LINE,EMPTY,1,indicator_color12);
   SetIndexStyle(13,DRAW_LINE,EMPTY,1,indicator_color13);
   SetIndexStyle(14,DRAW_LINE,EMPTY,1,indicator_color14);
   SetIndexStyle(15,DRAW_LINE,EMPTY,1,indicator_color15);
   SetIndexStyle(16,DRAW_LINE,EMPTY,1,indicator_color16);
   SetIndexStyle(17,DRAW_ARROW);
   SetIndexBuffer(17,ExtMapBuffer11);
   SetIndexArrow(17,233);
   SetIndexEmptyValue(0,0.0);
   SetIndexStyle(18,DRAW_ARROW);
   SetIndexBuffer(18,ExtMapBuffer12);
   SetIndexArrow(18,234);
   SetIndexEmptyValue(1,0.0);
   spread=MarketInfo(Symbol(),MODE_SPREAD)*Point;
   SetIndexDrawBegin(0,0);

//---- indicator buffers mapping
   SetIndexBuffer(0,ExtMapBuffer);
   SetIndexBuffer(1,ExtMapBuffer2);
   SetIndexBuffer(2,ExtMapBuffer3);
   SetIndexBuffer(3,ExtMapBuffer4);
   SetIndexBuffer(11,ExtMapBuffer5);
   SetIndexBuffer(12,ExtMapBuffer6);
   SetIndexBuffer(13,ExtMapBuffer7);
   SetIndexBuffer(14,ExtMapBuffer8);
   SetIndexBuffer(15,ExtMapBuffer9);
   SetIndexBuffer(16,ExtMapBuffer10);
   SetIndexEmptyValue(0,0.0);     
//---- indicator short name
   IndicatorShortName("blahblah1("+Ext2th+","+ExtDev4+","+ExtBack1+")");
   IndicatorShortName("blahclah2("+Ext2th2+","+ExtDev2+","+ExtBack2+")");
   return(0);
   
//---- Peroid 1  
   if (Period1>0)
   {
   SetIndexStyle(5,DRAW_ARROW,0,1); 
   SetIndexArrow(5,Symbol_1_Kod); 
   SetIndexBuffer(5,FP_BuferUp); 
   SetIndexEmptyValue(5,0.0); 
   
   SetIndexStyle(6,DRAW_ARROW,0,1); 
   SetIndexArrow(6,Symbol_1_Kod); 
   SetIndexBuffer(6,FP_BuferDn); 
   SetIndexEmptyValue(6,0.0); 
   }
   
//---- Peroid 2 
   if (Period2>0)
   {
   SetIndexStyle(7,DRAW_ARROW,0,2); 
   SetIndexArrow(7,Symbol_2_Kod); 
   SetIndexBuffer(7,NP_BuferUp); 
   SetIndexEmptyValue(7,0.0); 
   
   SetIndexStyle(8,DRAW_ARROW,0,2); 
   SetIndexArrow(8,Symbol_2_Kod); 
   SetIndexBuffer(8,NP_BuferDn); 
   SetIndexEmptyValue(8,0.0); 
   }
//---- Period 3 
   if (Period3>0)
   {
   SetIndexStyle(9,DRAW_ARROW,0,4); 
   SetIndexArrow(9,Symbol_3_Kod); 
   SetIndexBuffer(9,HP_BuferUp); 
   SetIndexEmptyValue(9,0.0); 

   SetIndexStyle(10,DRAW_ARROW,0,4); 
   SetIndexArrow(10,Symbol_3_Kod); 
   SetIndexBuffer(10,HP_BuferDn); 
   SetIndexEmptyValue(10,0.0); 
   }
   
// math for 3 alert
   int CDev=0;
   int CSt=0;
   int Mass[]; 
   int C=0;  
   if (IntFromStr(Dev_Step_1,C, Mass)==1) 
      {
        Stp1=Mass[1];
        Dev1=Mass[0];
      }
   
   if (IntFromStr(Dev_Step_2,C, Mass)==1)
      {
        Stp2=Mass[1];
        Dev2=Mass[0];
      }      
   
   
   if (IntFromStr(Dev_Step_3,C, Mass)==1)
      {
        Stp3=Mass[1];
        Dev3=Mass[0];
      }      
   return(0);    
   
  }
//+---

i have made another indicator that has a total of 7 buffers  and i know this is the max limit of INDEX index can only be at range of 1-7  but i don't know what to do to make all of my 18 buffers on this set of code.

 
Ricks creations #: how about my other question ... I am trying to get  my indicator i made work  but i have a lot of buffers  18 to be exact . 

The limit is 512 buffers, so 18 buffers is not a problem.

Note

The amount of buffers cannot exceed 512 and be less than the value set in #property indicator_buffers. If a custom indicator requires additional buffers for counting, IndicatorBuffers() function should be used for specifying the total amount of buffers.

Just remember to actually set the correct number of buffers:

IndicatorBuffers( 18 ); // 18, not 4

Also, please use the modern OnInit() and OnCalculate() style of the newer MQL4+ coding and not the old almost obsolete style of init() and start().

 
Fernando Carreiro #:

The limit is 512 buffers, so 18 buffers is not a problem.

Note

The amount of buffers cannot exceed 512 and be less than the value set in #property indicator_buffers. If a custom indicator requires additional buffers for counting, IndicatorBuffers() function should be used for specifying the total amount of buffers.

Just remember to actually set the correct number of buffers:

Also, please use the modern OnInit() and OnCalculate() style of the newer MQL4+ coding and not the old almost obsolete style of init() and start().

yeah my  buffers set to 18 but i can't seem to understand why when i load the indicator i only see buffer 1 & 2 visible 

#property indicator_buffers 18
 
Ricks creations #: yeah my  buffers set to 18 but i can't seem to understand why when i load the indicator i only see buffer 1 & 2 visible 

Total buffers is controlled by the "IndicatorBuffers( 18 )" function, not the "#property indicator_buffers 18", which sets the number of displayed plots.

Also, set the buffers with "SetIndexBuffer()" first before setting any of their attributes.

And finally, since you have not shown any code for the implementation, we are unable to verify if you are actually setting values for them correctly.

 
Fernando Carreiro #:

The limit is 512 buffers, so 18 buffers is not a problem.

Note

The amount of buffers cannot exceed 512 and be less than the value set in #property indicator_buffers. If a custom indicator requires additional buffers for counting, IndicatorBuffers() function should be used for specifying the total amount of buffers.

Just remember to actually set the correct number of buffers:

Also, please use the modern OnInit() and OnCalculate() style of the newer MQL4+ coding and not the old almost obsolete style of init() and start().

 IndicatorBuffers(4);
i changed it to 18, and still same issue  
 
Ricks creations #: i changed it to 18, and still same issue  

Did you change the rest of the points mentioned?

Show your new code!

Also show a screenshot of your Data Window, showing all the lines for this indicator.

 
Fernando Carreiro #:

Did you change the rest of the points mentioned?

Show your new code!

Also show a screenshot of your Data Window, showing all the lines for this indicator.



#property indicator_chart_window
#property indicator_buffers 19
#property indicator_color1 Purple
#property indicator_width1 2
#property indicator_color2 Purple
#property indicator_width2 2
#property indicator_color3 DarkGray
#property indicator_width1 2
#property indicator_color4 DarkGray
#property indicator_width2 2
#property indicator_color5 DeepSkyBlue 
#property indicator_color6 DeepSkyBlue 
#property indicator_color7 Red
#property indicator_color8 Red
#property indicator_color9 Yellow
#property indicator_color10 Yellow
#property indicator_color11 Purple
#property indicator_color12 Purple
#property indicator_color13 Purple
#property indicator_color14 Silver
#property indicator_color15 Silver
#property indicator_color16 Aqua
#property indicator_color17 Blue
#property indicator_color18 Red
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
  // --------- Math Cell values alert 
   if (Period1>0) F_Period=MathCeil(Period1*Period()); else F_Period=0; 
   if (Period2>0) N_Period=MathCeil(Period2*Period()); else N_Period=0; 
   if (Period3>0) H_Period=MathCeil(Period3*Period()); else H_Period=0; 
   
   IndicatorBuffers(19);
   SetIndexStyle(0,DRAW_ARROW);
   SetIndexArrow(0, 233);
   SetIndexStyle(1,DRAW_ARROW);
   SetIndexArrow(1, 234);
   SetIndexStyle(0,DRAW_ARROW);
   SetIndexArrow(0, 233);
   SetIndexStyle(1,DRAW_ARROW);
   SetIndexArrow(1, 234);
   SetIndexStyle(0,DRAW_LINE,EMPTY,1,indicator_color11);
   SetIndexStyle(1,DRAW_LINE,EMPTY,1,indicator_color12);
   SetIndexStyle(2,DRAW_LINE,EMPTY,1,indicator_color13);
   SetIndexStyle(3,DRAW_LINE,EMPTY,1,indicator_color14);
   SetIndexStyle(4,DRAW_LINE,EMPTY,1,indicator_color15);
   SetIndexStyle(5,DRAW_LINE,EMPTY,1,indicator_color16);
   SetIndexStyle(0,DRAW_ARROW);
   SetIndexBuffer(17,ExtMapBuffer11);
   SetIndexArrow(0,233);
   SetIndexEmptyValue(0,0.0);
   SetIndexStyle(1,DRAW_ARROW);
   SetIndexBuffer(18,ExtMapBuffer12);
   SetIndexArrow(1,234);
   SetIndexEmptyValue(1,0.0);
   spread=MarketInfo(Symbol(),MODE_SPREAD)*Point;
   SetIndexDrawBegin(0,0);

//---- indicator buffers mapping
   SetIndexBuffer(0,ExtMapBuffer);
   SetIndexBuffer(1,ExtMapBuffer2);
   SetIndexBuffer(2,ExtMapBuffer3);
   SetIndexBuffer(3,ExtMapBuffer4);
   SetIndexBuffer(11,ExtMapBuffer5);
   SetIndexBuffer(12,ExtMapBuffer6);
   SetIndexBuffer(13,ExtMapBuffer7);
   SetIndexBuffer(14,ExtMapBuffer8);
   SetIndexBuffer(15,ExtMapBuffer9);
   SetIndexBuffer(16,ExtMapBuffer10);
   SetIndexEmptyValue(0,0.0);     
//---- indicator short name
   IndicatorShortName(" Pointer("+ExtDepth+","+ExtDeviation+","+ExtBackstep+")");
   IndicatorShortName("RPointer("+ExtDepth2+","+ExtDeviation2+","+ExtBackstep2+")");
   return(0);
   
//---- Peroid 1  
   if (Period1>0)
   {
   SetIndexStyle(0,DRAW_ARROW,0,1); 
   SetIndexArrow(0,Symbol_1_Kod); 
   SetIndexBuffer(5,FP_BuferUp); 
   SetIndexEmptyValue(0,0.0); 
   
   SetIndexStyle(1,DRAW_ARROW,0,1); 
   SetIndexArrow(1,Symbol_1_Kod); 
   SetIndexBuffer(6,FP_BuferDn); 
   SetIndexEmptyValue(1,0.0); 
   }
   
//---- Peroid 2 
   if (Period2>0)
   {
   SetIndexStyle(2,DRAW_ARROW,0,2); 
   SetIndexArrow(2,Symbol_2_Kod); 
   SetIndexBuffer(7,NP_BuferUp); 
   SetIndexEmptyValue(2,0.0); 
   
   SetIndexStyle(3,DRAW_ARROW,0,2); 
   SetIndexArrow(3,Symbol_2_Kod); 
   SetIndexBuffer(8,NP_BuferDn); 
   SetIndexEmptyValue(3,0.0); 
   }
//---- Period 3 
   if (Period3>0)
   {
   SetIndexStyle(4,DRAW_ARROW,0,4); 
   SetIndexArrow(4,Symbol_3_Kod); 
   SetIndexBuffer(9,HP_BuferUp); 
   SetIndexEmptyValue(4,0.0); 

   SetIndexStyle(5,DRAW_ARROW,0,4); 
   SetIndexArrow(5,Symbol_3_Kod); 
   SetIndexBuffer(10,HP_BuferDn); 
   SetIndexEmptyValue(5,0.0); 
   }
   
// math for alert
   int CDev=0;
   int CSt=0;
   int Mass[]; 
   int C=0;  
   if (IntFromStr(Dev_Step_1,C, Mass)==1) 
      {
        Stp1=Mass[1];
        Dev1=Mass[0];
      }
   
   if (IntFromStr(Dev_Step_2,C, Mass)==1)
      {
        Stp2=Mass[1];
        Dev2=Mass[0];
      }      
   
   
   if (IntFromStr(Dev_Step_3,C, Mass)==1)
      {
        Stp3=Mass[1];
        Dev3=Mass[0];
      }      
   return(0);    
   
  }


i dont know what you mean by data window do you mean under color in settings where it shows all the buffers

https://i.ibb.co/93Jsgc9/image.png