MQL4 Close Price Series
Overview
double Close[]: A series array containing the closing prices for each bar of the current chart.0 for the current bar, Bars-1 for the oldest bar.Usage
Related Functions
iClose(): Returns the close price of a specified bar.Example Snippet
// Writing historical data to a CSV file
int handle = FileOpen("file.csv", FILE_CSV | FILE_WRITE, ";");
if(handle > 0) {
FileWrite(handle, "Time;Open;High;Low;Close;Volume");
for(int i = 0; i < Bars; i++) {
FileWrite(handle, Time[i], Open[i], High[i], Low[i], Close[i], Volume[i]);
}
FileClose(handle);
}
See Also
BidDigits
Previous
arrow_back
Bid
Next
High
arrow_forward