MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal

Automated Trading Language Documentation

Buy Expert Advisors in MetaTrader Market and Let Them Trade For You

SetSymbolPeriod

Changes symbol and period of the chart, assigned to the class instance.

bool  SetSymbolPeriod(
   const string     symbol_name,     // Symbol
   ENUM_TIMEFRAMES  timeframe        // Period
   )

Parameters

symbol_name

[in]  New symbol name. NULL means the symbol of the current chart (to which expert attached).

timeframe

[in]  New chart timeframe (ENUM_TIMEFRAMES enumeration). 0 means the current timeframe.

Returned value

true if successful, false if property hasn't changed.


Updated: 2014.07.17