get the CCI value displayed

 

I'm new in mql5,

I want to get the exact value displayed here:

cci 

But I always get a different value. For instance, I got this values for the example above:

values 

As you can see, it is not the same date. And when I try to find the value the April 23th (in my example) I find nothing.

The code I used is this:

double      CCI[];                // array for the indicator iCCI
//---- handles for indicators
int         CCI_handle; 
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
   //--- creation of the indicator iCCI
   CCI_handle=iCCI(NULL,0,20,PRICE_CLOSE);
   ArraySetAsSeries(CCI, true);
   //--- report if there was an error in object creation
   if(CCI_handle<0)
     {
      Print("The creation of iCCI has failed: Runtime error =",GetLastError());
      //--- forced program termination
      return(-1);
     }
   //---
   return(INIT_SUCCEEDED);
  }
void OnTick()
  {
//---
   CopyBuffer(CCI_handle,0,0,20,CCI);
   Print(CCI[19]);
  }

 Can someone help me to get the vale displayed ?

 

Please use:

double      CCI[];                // array for the indicator iCCI
//---- handles for indicators
int         CCI_handle; 
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
   //--- creation of the indicator iCCI
   CCI_handle=iCCI(NULL,0,20,PRICE_CLOSE);
   //--- report if there was an error in object creation
   if(CCI_handle<0)
     {
      Print("The creation of iCCI has failed: Runtime error =",GetLastError());
      //--- forced program termination
      return(-1);
     }
   //---
   return(INIT_SUCCEEDED);
  }
void OnTick()
  {
//---
   int count=CopyBuffer(CCI_handle,0,0,1,CCI);
   Comment(DoubleToString(CCI[0],2));
  }

1