Knowledgebase:
ObjectSeriesGetValue
Posted by Mohammad Rahhal, Last modified by Rawan Al Hourani on 06 July 2017 03:14 PM

Syntax

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.

Parameters

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.

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