Posted by Mohammad Rahhal, Last modified by Rawan Al Hourani on 17 July 2017 12:31 PM


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

This function is used to get into the TimeArray the history data of the times bar for the selected symbol period.


Key Description 
SymbolName The name of symbol to get the times bar prices for it, value of type string
TimeFrame Symbol period , value of type  ENUM_TIMEFRAMES
StartPos The start position for the first bar, value of type long
Count The data count to get the times bar for it, value of type Long
TimeArray Times bar result, value of type Variant

Return value

Returns the bars count that gets the times for, and return 0 if the start posistion less than 0. If an error occurred, call GetLastError to read the error.


 Public Sub main()

    Dim Count

    Dim arr ()

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

    AlertMessage ("the time data 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