Syntax
Public Function ChartSymbol(Optional chart_id As Long = 0) As String
Description
This function is used to return the symbol name for the specified chart by a given the chart ID.
Parameters
Key | Description |
chart_id | Chart identifier, 0 is the current chart ,value of type Long |
Return value
Returns the symbol name. If the chart does not exist, the result will be an empty string.In order to get an error , callGetLastError()function.
Sample
Public Sub main()AlertMessage ChartSymbol(ChartOpen("EUR/USD",PERIOD_M1)) 'Opens a new chart for EUR/USD and returns the symbol name End Sub
See Also