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

Syntax

Public Function SetSeriesStyle(chart_id As Long, seriesName As String, SeriesStyle As ENUM_SERIES_TYPE) As Boolean

Description

This function sets the style for a given indicator line.

Parameters

Key Description 
chart_id Chart identifier, 0 is the current chart, a value of type Long
seriesName Series Name to set the style for it, a value of type String.
SeriesStyle The value can be one of ENUM_SERIES_TYPE

Return value

If the function succeeds, the returned value will be True, otherwise, it will be false.To get the detailed error information, call GetLastError().

Sample

Dim indKey

Dim flag

public Sub main()

  Dim openarry()

  CopyOpen 0,1, bars(0),openarry

  indKey=AddCustomIndicator(0,openarry,1,true)

  SetSeriesStyle 0,cstr(indKey),VOLUME_CHART

  flag = 1

  IntervalTimer 2000

  EnableTimer  True

 End Sub

 Public Sub OnTimer()

  If flag = 1 Then

    flag = 0

    SetSeriesStyle 0,cstr(indKey),LINE_CHART

  Else

    flag = 1

    SetSeriesStyle 0,cstr(indKey),VOLUME_CHART

  End If

End Sub

 


See Also


Back to VTL Client Script Index

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