Find the easy code's mistake ,Why i have define buffer,and give the value ,but i can't get the value,why

 
//+------------------------------------------------------------------+
//|                                               台湾鸟-波动率.mq4 |
//|                        Copyright 2012, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright 2012, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

#property indicator_separate_window
#property indicator_buffers 4
#property indicator_color1 Red
#property indicator_color2 Yellow
#property indicator_color3 MediumSpringGreen
#property indicator_color4 Green

#property indicator_maximum 20
#property indicator_minimum -20


//--- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
double count[];
double ave[];
double chazhi[];
double countpingjuncang[];

extern int bar=10;
extern int display=10000;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,ExtMapBuffer1);
   SetIndexStyle(1,DRAW_LINE);
   SetIndexBuffer(1,ExtMapBuffer2);
   SetIndexStyle(2,DRAW_LINE);
   SetIndexBuffer(2,ExtMapBuffer3);
   SetIndexStyle(3,DRAW_LINE);
   SetIndexBuffer(3,ExtMapBuffer4);
   SetIndexBuffer(4,count);
   SetIndexBuffer(5,ave);
   SetIndexBuffer(6,chazhi);
   SetIndexBuffer(7,countpingjuncang);
   SetIndexDrawBegin(0,bar+10);
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
 // Alert(Close[1]);
   int limit;
   int i;
   int x;
   int counted_bars=IndicatorCounted();
   if(counted_bars>0) counted_bars--;
   limit=Bars-counted_bars;
   //limit=20;
  // i=limit;
   for(i=0;i<=limit;i++)
      {
         double xy=MathPow(bar/2,2); 
         count[i]=1000;
         ave[i]=1000;
         chazhi[i]=0;
         countpingjuncang[i]=0;
 
         Alert(count[i]);
   }
   return(0);
  }
//+------------------
i define the array int buffer,i see another indicator can use the array ,but the alert value is 0 .WHY
 
zdj231:

Find the easy code's mistake ,Why i have define buffer,and give the value ,but i can't get the value,why

i define the array int buffer,i see another indicator can use the array ,but the alert value is 0 .WHY


How many indicator buffers do you have ?

 

#property indicator_buffers   4

//--- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
double count[];
double ave[];
double chazhi[];
double countpingjuncang[];
 
thank you very much,problom solove,thank you thank you
 
#property indicator_buffers   4
If you don't want them all to show, use IndicatorBuffers - MQL4 Documentation