Changes the symbol and period of the specified chart. The function is asynchronous, i.e. it sends the command and does not wait for its execution completion. The command is added to chart messages queue and will be executed after processing of all previous commands.
[in] Chart ID. 0 means the current chart.
[in] Chart symbol. NULL value means the current chart symbol (Expert Advisor is attached to)
[in] Chart period (timeframe). Can be one of the ENUM_TIMEFRAMES values. 0 means the current chart period.
The symbol/period change leads to the re-initialization of the Expert Advisor attached to a chart.
The call of ChartSetSymbolPerid with the same symbol and timeframe can be used to update the chart (similar to the terminal's Refresh command). In its turn, the chart update triggers re-calculation of the indicators attached to it. Thus, you are able to calculate an indicator on the chart even if there are no ticks (e.g., on weekends).