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
|