Posted by Mohammad Rahhal, Last modified by Diana Alkouni on 02 September 2020 12:13 PM


Public Function GetTime(chart_ID As Long, Record As Long)As String


This function is used to return the time value for the bar of indicated chart. If local history is empty, a function returns -1. 


Key Description 
chart_ID Chart identifier, 0 is the current chart, value of type Long
Record Bar number to get the time for it, the value of type Long.

Return value

If the returns value was -1, the local history is empty. If it fails, the returned value will be 0. To get the detailed error information, call GetLastError().


Public Sub main()

  Dim result

  result = GetTime(10,50)

  If result = "0" Then

    AlertMessage "The returned value  from GetTime  is 0 .To get the detailed error information, call        GetLastError()."

  elseif  result = "" then

    AlertMessage "The local history is empty"


    AlertMessage "The Time Value for the bar of indicated chart is : " &  result

End If 

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