How i can store every candle in history data to a matrix array, for using the data with my math function?

 
I need to get the open,close,high, low data of every candle, for make my algorithm. where i can get this information? How it's called the variable of this elements? 
 
Damiano Baldoni :
I need to get the open,close,high, low data of every candle, for make my algorithm. where i can get this information? How it's called the variable of this elements? 

If you are working in the INDICATOR, then you already have all the data arrays in the OnCalculate function:

int  OnCalculate(
   const int        rates_total,       // size of input time series
   const int        prev_calculated,   // number of handled bars at the previous call
   const datetime&  time{},            // Time array
   const double&    open[],            // Open array
   const double&    high[],            // High array
   const double&    low[],             // Low array
   const double&    close[],           // Close array
   const long&      tick_volume[],     // Tick Volume array
   const long&      volume[],          // Real Volume array
   const int&       spread[]           // Spread array
   );

If you are working in an Expert Advisor, you should use CopyRates

Documentation on MQL5: Timeseries and Indicators Access / CopyRates
Documentation on MQL5: Timeseries and Indicators Access / CopyRates
  • www.mql5.com
CopyRates - Timeseries and Indicators Access - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Reason: