Posted by Mohammad Rahhal, Last modified by Diana Alkouni on 25 August 2020 10:28 AM


Public Function OpenPrices(SymbolName As String, TimeFrame As ENUM_TIMEFRAMES, StartPos As Long, Count As Long, ByRef OpenArray As Variant) As Integer 


This function is used to get into the OpenArray the history data of the bar open prices for the selected symbol period.


Key Description 
SymbolName The name of the symbol to get the open 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 open bar prices for, the value of type Long
OpenArray Open prices bar result, the value of type Variant

Return value

Returns the bars count that gets the open prices of, and return 0 if the start position less than 0. If an error occurred, call GetLastError to read the error.


 Public Sub main()

    Dim Count

    Dim arr ()

    Count = OpenPrices ("EUR/USD", PERIOD_M5, 1, Bars (0), arr)

    AlertMessage ("the open price for the bar number 30 is " & Arr (30))

 End Sub

 See Also

Back to VTL Client Script Index

(0 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name:
CAPTCHA Verification 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Hybrid Solutions