Syntax
Public Function HighPrices(SymbolName As String, TimeFrame As ENUM_TIMEFRAMES, StartPos As Long, Count As Long, ByRef highArray As Variant) As Integer
Description
This function is used to get into the highArray the history data of the bar high prices for the selected symbol period.
Parameters
Key | Description |
SymbolName | The name of the symbol to get the highest bar prices for, the value of type string |
TimeFrame | Symbol period, the value of type ENUM_TIMEFRAMES |
StartPos | The start position for the first bar, the value of type long |
Count | The data count to get the highest bar prices for, the value of type Long |
highArray | Bar high prices result, the value of type Variant |
Return value
Returns the bars count that gets the high prices of, and return 0 if the start pos less than 0. If an error occurred, call GetLastError to read the error.
Sample
Public Sub main() Dim Count Dim arr () Count = HighPrices ("EUR/USD", PERIOD_M5, 1, Bars (0), arr) AlertMessage ("the high price for the bar number 30 is " & Arr (30)) End Sub
See Also