This problem occour only if
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 );
is called in OnInit() while Testing.
//+------------------------------------------------------------------+ //| Prova_Custom_Symbol.mq5 | //| Copyright 2012, MetaQuotes Software Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2012, MetaQuotes Software Corp." #property link "https://www.mql5.com" #property version "1.00" string ext_custom_symbol="EURUSD_custom"; //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { if(SymbolInfoInteger(ext_custom_symbol,SYMBOL_CUSTOM)) { Print(ext_custom_symbol+" has been already created!"); return(INIT_SUCCEEDED); } if(!CustomSymbolCreate(ext_custom_symbol)) { Print("Error Creation Custom Symbol "+ext_custom_symbol); Print("Error n° "+(string)GetLastError()); } else Print("Custom Symbol "+ext_custom_symbol+" created"); return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- } //+------------------------------------------------------------------+
Otherwise is OK.
Does anyone know how to run strategy tester with imported tick data on custom symbol?
=============================================================================
If this is not a right forum to post, kindly suggest the appropriate forum so i can move it ; )
I am using MT5 version: 5.00 build 1795 (03 Apr 2018) on Win7.
Trying to run strategy tester with custom symbol which only has imported tick data.
According to the instruction on MQL website in below, ref:https://www.mql5.com/en/articles/3540 , strategy tester can run just with imported tick data and do not need imported minute data.
But when I try this with recent version of MT5, I could not get it running.
One thing I find is in new version of strategy tester, comparing with above old strategy tester, new one has dropdown box (circle in red) to select the minute data and lowest is "M1" and it doesn't have "Tick".
Therefore, when I import tick data into custom symbol (without minute data), I get below error.
Does anyone know how to run strategy tester with imported tick data on custom symbol?
Below is steps what I have done.
1. in Symbol window -> Tick tab, exported recent 1 week tick data from USDJPY
2. in Symbol window -> Specification tab, create a custom symbol (named USDJPY.custom)
3. in Symbol window -> Tick tab, import step 1 tick data into USDJPY.custom
4. in strategy tester, selected USDJPY.custom, select every tick based on real tick and select M1 (as i need to select something)
5. in strategy tester window, it complain it can't find M1 data...
I believe I read that MT5 will generate minute data from tick data if tick data is available. has the requirement changed for testing in tick data, need also min. of M1 data?
kind regards,
Soi
Please don't double post.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
New MetaTrader 5 Platform Build 1640: Creating and testing custom symbols
MetaTrader 5 platform update is to be released on July 21, 2017. The update will feature the following changes:
Creating a Custom Symbol
Open the symbol management window using the context menu of the "Market Watch" window and click on "Create Custom Symbol":

A large number of symbol parameters can be configured. The full list of parameters and their description is available in the documentation. You can quickly configure your custom symbol by copying parameters of any similar instrument and modifying them. Select an existing symbol in the "Copy from" field.Managing Custom Symbols
All symbols are displayed in a separate Custom group. If you need to modify or delete a symbol, use the context menu of the list:
Importing the Price History
You can import price data to your custom symbol from any text file. Choose a symbol and go to the "Bars" tab.

In the import dialog, specify the path to the file and set the required parameters:A file with 1-minute bars should have the following format: Date Time Open High Low Close TickVolume Volume Spread. For example;
2016.06.27 00:02:00 1.10070 1.10165 1.10070 1.10165 32 55575000 46
2016.06.27 00:03:00 1.10166 1.10166 1.10136 1.10163 13 13000000 46
2016.06.27 00:04:00 1.10163 1.10204 1.10155 1.10160 23 51000000 41
Using Custom Symbols
Use of custom symbols is similar to the use of instruments provided by the broker. Custom symbols are displayed in the Market Watch window; you can open charts of such symbols and apply indicators and analytical objects on them. Custom symbols cannot be traded.
Testing Strategies on Custom Symbols
Custom symbols can be used for testing trading robots and indicators in the strategy tester. This allows for optimization of strategies even for the financial symbols a broker is currently unable to provide. You just need to import history correctly and configure the custom symbol properties.

When calculating the margin and profit, the strategy tester automatically uses available cross rates. Suppose that we have created AUDCAD.custom symbol with the Forex type of margin calculation, and our account currency is USD. In this case, the tester searches for the necessary symbols in the following order based on the Forex symbol name:Instruments with other types of margin calculation (CFD, Futures and Stock Exchange) require a currency pair to convert the instrument currency into the deposit one. Suppose that we have created a custom symbol with profit and margin currency expressed in GBP, while the deposit currency is CHF. In this case, the search for testing symbols is performed in the following order:
When testing applications using custom instruments, make sure that the trading account has all the necessary currency pairs. Otherwise, the calculation of financial results and margin requirements during testing will not be possible.
More possibilities will be available in future platform versions
The development of custom symbols has not completed yet, and more functions will be added in the next builds of the platform. You will be able to import history to custom symbols straight from Expert Advisors, as well as broadcast data (add quotes) of such symbols in real time.
Deals with the volume less than the specified value can be hidden from the Time & Sales table. If this filter is applied, only large deals will appear in the Time & Sales window.
Double click on the first line in the Time & Sales window, specify the minimum volume in lots, and then click on any other area of the Market Depth. Trades will be filtered, and the current filter value will appear in the volume column header.

You can also specify the minimum volume using the Time & Sales context menu.When profiling based on real data, the program is launched in a normal chart of the terminal. Many programs, especially indicators, only perform calculations at the arrival of a new tick (OnTick, OnCalculate). Thus, in order to evaluate performance, you have to wait for new ticks in real time. If you test a program using history data, you can immediately provide the required load. Profiling is launched in the visual mode in the Strategy Tester, and you receive a lot of new tick events at a time.
Unlike the structure, various union members belong to the same memory area. In this example, the union of LongDouble is declared with long and double type values sharing the same memory area. Please note that it is impossible to make the union store a long integer value and a double real value simultaneously (unlike a structure), since long_value and double_value variables overlap (in memory). On the other hand, an MQL5 program is able to process data containing in the union as an integer (long) or real (double) value at any time. Therefore, the union allows receiving two (or more) options for representing the same data sequence.
During the union declaration, the compiler automatically allocates the memory area sufficient to store the largest type (by volume) in the variable union. The same syntax is used for accessing the union element as for the structures, i.e. the point operator.
Memberwise copying of objects is performed in the implicit operator.
If necessary, you can override the behavior and create your own option instead of an implicit copy operator, using overloading.
New properties
Order, deal and position creation reasons
Three variables have been added for obtaining the reasons for the creation of trading operations:

To jump to a breakpoint, double-click on it.