Open MQL5 help files. Click on MQL5 Reference > Language Basic > Event Handling Function then scroll down to OnCalculate () function like this one :
int OnCalculate (const int rates_total, // size of input timeseries const int prev_calculated, // bars handled in previous call const datetime& time[], // Time const double& open[], // Open const double& high[], // High const double& low[], // Low const double& close[], // Close const long& tick_volume[], // Tick Volume const long& volume[], // Real Volume const int& spread[] // Spread );
Quote
" Parameters of open[], high[], low[] and close[] contain arrays with open prices, high and low prices and close prices of the current timeframe.The time[] parameter contains an array with open time values, the spread[] parameter has an array containing the history of spreads (if any spread is provided for the traded security). The parameters of volume[] and tick_volume[] contain the history of trade and tick volume, respectively."
End Quote
Documentation on MQL5: Standard Constants, Enumerations and Structures / Indicator Constants / Price Constants
- www.mql5.com
Standard Constants, Enumerations and Structures / Indicator Constants / Price Constants - Documentation on MQL5
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
How could I get access to the actual bars data. What ist the idea behind this.
In MQL4 i can get these informations with High[i], Low[i], ... In the doc i have seen a lot of copy commands. In OOP normally i have to create an object, then access with a method or a variable of this object.
Thank you.