ObjectSeriesGetValue
Posted by Mohammad Rahhal, Last modified by Diana Alkouni on 07 September 2020 12:54 PM

Syntax

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

Description

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

Parameters

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

Return value

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

Sample

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))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
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