Download MetaTrader 5
MQL5 ReferenceCustom SymbolsCustomSymbolCreate 


Creates a custom symbol with the specified name in the specified group.

bool  CustomSymbolCreate(
   const string     symbol_name,         // custom symbol name
   const string     symbol_path=""       // name of the group, in which a symbol is to be created



[in]  Custom symbol name. It should not contain groups or subgroups the symbol is located in.


[in]  The group name a symbol is located in.

Return Value

true — success, otherwise — false. To get information about the error, call the GetLastError() function.


The custom symbol name should be unique regardless of a group name it is created in.

The symbol and group names may only contain Latin letters without punctuation, spaces or special characters (may only contain ".", "_", "&" and "#"). It is not recommended to use characters <, >, :, ", /, |, ?, *.


See also

SymbolName, SymbolSelect, CustomSymbolDelete