Syntax
Public Function ChartSetSymbolPeriod(chart_id As Long, Period As ENUM_TIMEFRAMES)As Boolean
This function is used to change the period of the specified given the chart with a new time frame.
Parameters
Key | Description |
chart_id | Chart identifier .0 is the current chart,as a value of type long. |
Period | The new time frame, value of typeENUM_TIMEFRAMES. |
Return value
Returns true if successful, otherwise returns false, to get error call GetLastError().
Sample
Public Sub main()AlertMessage ChartSetSymbolPeriod(0,PERIOD_H1) 'Returns true and reloads the chart with the new period.End Sub
See Also