MetaTrader 5 build 2485: iCustom improvements and overall optimization in MQL5
What's new in MetaTrader 5
- Optimized and significantly accelerated bar history editing for custom financial instruments. The improvement also concerns the CustomRatesUpdate function.
- Fixed exporting of custom symbol settings to a JSON file.
- Fixed errors reported in crash logs.
- This version features a revised custom indicator loading algorithm via iCustom.
If the backslash '\' is indicated before the custom indicator name, the
EX5 indicator file is searched relative to the MQL5 root folder. So,
for a call of iCustom(Symbol(), Period(), "\FirstIndicator"...), the
indicator will be loaded as MQL5\FirstIndicator.ex5. If the file is not
found at this path, error 4802 (ERR_INDICATOR_CANNOT_CREATE) is
If the path does not start with a backslash '\', the
indicator is searched and loaded based on the following sequence of
- The EX5 file is searched in the same folder,
where the caller program's EX5 is located. For example, the CrossMA.EX5
Expert Advisor is located at MQL5\Experts\MyExperts. It contains the
following call: iCustom(Symbol(), Period(), "SecondIndicator"...). In
this case, the indicator is searched at
- If the indicator is
not found, a search relative to the Indicators root directory is
performed: MQL5\Indicators. Thus, file
MQL5\Indicators\SecondIndicator.ex5 is searched. If the indicator is not
found, the function returns INVALID_HANDLE and error 4802
(ERR_INDICATOR_CANNOT_CREATE) is raised.
the indicator path is set in a subdirectory such as
MyIndicators\ThirdIndicator, the search starts in the folder of the
calling program (the Expert Advisor is located in the folder
MQL5\Experts\MyExperts) at the following path:
MQL5\Experts\MyExperts\MyIndicators\ThirdIndicator.ex5. In case of
failure, file MQL5\Indicators\MyIndicators\ThirdIndicator.ex5 is
searched. Please note that the path separator should be specified as a
double backslash '\\'. For example: iCustom(Symbol(), Period(),
Also, if a custom indicator
call via iCustom is found in the program code, the compiler will
implicitly add the "#property tester_indicator XXX" directive if it is
- Optimized and significantly accelerated HistorySelect function, which allows requesting the history of deals and orders.
- Fixed an occasional error in tick requesting via the CopyTicksRange function. The error caused the range beginning to be set to the day beginning rather than to the specified time.
- Optimized and significantly accelerated display of alerts via the Alert function.
- New property SYMBOL_TIME_MSC for the symbol's last tick time in milliseconds. The property can be obtained using the SymbolInfoInteger function.
See the previous news, please: