MQL4 Predefined Variable: Open
Overview
double Open[] is a series array containing the open prices for each bar on the current chart. Elements are indexed in reverse order, with index 0 representing the current (last) bar and index Bars-1 representing the oldest bar on the chart.
Data Structure
double[] (Series Array)Bars-1 = oldest bar).Usage
Access historical open prices using array indexing. For example, Open[i] retrieves the open price of the bar at index i.
Related Variables
Bars: Total number of bars on the chart.High[]: Series array for high prices.Low[]: Series array for low prices.Close[]: Series array for close prices.Volume[]: Series array for volume.Related Functions
iOpen(): Function to retrieve the open price of a specific bar.Example Snippet
i = Bars - counted_bars - 1;
while(i >= 0) {
double open = Open[i];
// ... process open price ...
i--;
}
Platform Support
Previous
arrow_back
Low