Syntax
Public Function iHighest(Symbol As String, timeFrame As ENUM_TIMEFRAMES, barsCount As Long, Start As Long) As Double
Description
This function is used to return the highest high value for the specific bars by giving the symbol and time frame of the chart.
Parameters
Key | Description |
Symbol | Chart symbol name, a value of type String. |
TimeFrame | Chart period, a value of type ENUM_TIMEFRAMES |
BarsCount | The chart bars number, a value of type Long. |
Start | The first bar number to get the highest high value after it, a value of type Long. |
Return value
Returnsthe highest high value for indicated symbol and bars. Return 0 if the bar’s history not loaded.
Sample
Public Sub main() Dim BarsNumber Dim FirstBar Dim Result BarsNumber= 20 FirstBar=1 Result= iHighest (EUR/USD, PERIOD_D1, Clng (BarsNumber), Clng (FirstBar)) AlertMessage Result End Sub
See Also