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. |
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, callGetLastError().
Sample
Dim indKeyDim flagpublic 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 IfEnd Sub
See Also