Posted by Mohammad Rahhal, Last modified by Salameh Abu Hashish on 14 January 2019 01:31 PM


Public Function ObjectSeriesGetValue(chart_ID As Long, SeriesName As String, recordNumber As Long, ByRef Value As Variant)As Boolean

This function is used to get the value of specific series in the chart by a given the series name.


Key Description 
chart_ID Chart identifier, 0 mean the current chart,value of type Long.
SeriesName Series key,value of type String.
recordNumber Bar number,value of type Long.
Value The returned value of the series,value of type Variant.

Return value

Return true if successful, otherwise it return false. To read more about the error call GetLastError() function.


Public Sub main()
 Dim BarsVal
 Dim MACDstr
 Dim MACDline
 Dim SignalLine
 Dim MACDlineResult
 Dim SignalLineResult
 BarsVal = Bars(0)
 MACDstr = MACD(0,5,1,3)
 MACDline = MACDstr
 SignalLine = MACDstr & " Signal"
 If ObjectSeriesGetValue(0, CSTR(MACDline), CLNG(BarsVal), MACDlineResult) Then
   AlertMessage CStr("MACD " & MACDlineResult)
 End If
 If ObjectSeriesGetValue(0, CSTR(SignalLine), CLNG(BarsVal), SignalLineResult) Then
  AlertMessage CStr("Signal " & SignalLineResult)
 End If
End Sub

See Also

Back to VTL Client Script Index

(2 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