Discussion of article "Creating and testing custom symbols in MetaTrader 5" - page 2

 
Rashid Umarov:

According to the logs, the deposit currency = USD, testing is performed on EURCHF symbol. The tester needs EURUSD or USDEUR quotes to calculate the margin.

He searches for them among the available symbols and finds EURUSD, the downloading and synchronisation takes place

The screenshothere shows the settings of all currencies of the custom symbol, which is used for the test. And nothing should depend on the name of the custom symbol.

 
fxsaber:

And nothing should depend on the name of the custom symbol.

Read carefully the article

Testing trading strategies on a custom symbol

The MetaTrader 5 Multi-threaded Strategy Tester allows you to test strategies trading on many financial instruments on real ticks. Take full advantage of its advantages to test strategies on your own symbols. All you need to do is import a high-quality minute (or better yet, tick) history and set up properties for each instrument necessary to recreate the trading environment in detail. After that, just select the desired Expert Advisor and set the testing settings. Everything is done in the same way as with regular trading symbols provided by your broker.

It is important to provide the tester with all necessary symbols that may be needed to calculate margin requirements and profit in the currency of your trading account. When calculating margin and profit, the strategy tester automatically uses the available cross rates. For example, we have created AUDCAD.custom symbol with Forex margin calculation type and our account currency is USD. Then based on the name of the forex instrument, the tester searches for the necessary symbols in the following order:

  1. first, symbols like AUDUSD.custom (for margin calculation) and USDCAD.custom (for calculation of profit on deals) are searched for.
  2. then, if any of these instruments is missing, the first symbol is searched for, which corresponds by name to the necessary currency pairs - AUDUSD and USDCAD respectively. For example, AUDUSD.b and USDCAD.b are found - it means that the rates of these instruments will be used for margin and profit calculations.

 
Rashid Umarov:

Read the article carefully

I paid attention to this right away when reading the article for the first time. For a tester, the concepts of" SymbolBase Currency ", "Symbol Margin Currency" and "Symbol Profit Currency" are nothing?

I wanted to test a XXXYYY-customised symbol - yes, exactly with that name. It is a clone of the EURUSD symbol. I.e. all currencies of the symbol are clearly defined.

And now the testing should be rejected on the grounds that the name is not to your liking?!

All symbol settings are contained in its properties, not in the name.

How to make EURCHF_custom symbol perceive its clearly defined settings and not ignore them looking only at the name?

Changed the Calculation Method from Forex to Futures, result

2017.09.05 11:25:03.448 Tester  EURCHF_custom: history data begins from 2017.07.26 00:00
2017.09.05 11:25:03.448 Tester  EURUSD: history data begins from 1981.01.02 00:00
2017.09.05 11:25:03.548 Tester  USDCHF: preliminary downloading of M1 history started
2017.09.05 11:25:05.472 Tester  USDCHF: 20% history downloaded
2017.09.05 11:25:07.102 Tester  USDCHF: 31% history downloaded
2017.09.05 11:25:08.023 Tester  USDCHF: 40% history downloaded
2017.09.05 11:25:09.761 Tester  USDCHF: 54% history downloaded
2017.09.05 11:25:10.576 Tester  USDCHF: 61% history downloaded
2017.09.05 11:25:12.310 Tester  USDCHF: 75% history downloaded
2017.09.05 11:25:13.128 Tester  USDCHF: 82% history downloaded
2017.09.05 11:25:14.871 Tester  USDCHF: 95% history downloaded
2017.09.05 11:25:15.685 Tester  USDCHF: preliminary downloading of M1 history completed in 0:12.231
2017.09.05 11:25:15.685 Tester  USDCHF: history data begins from 2015.12.14 00:00
2017.09.05 11:25:15.685 Core 1  agent process started

Keeps pulling two majors, completely ignoring the symbol settings.

 
Many runtime settings depend on the Character User Group. How do I set it?
 

Forum on trading, automated trading systems and testing trading strategies

Libraries: Symbol

fxsaber, 2017.09.20 07:31 AM.

Takes a free demo version of the Expert Advisor from the Market and races in the tester on fresh quotes, copier takes data from the result of the tester. Accordingly, the paid version is not required.


Perhaps it is necessary to forbid Market Expert Advisors backtest on custom symbols...

 

If I need to create a full interactive copy of a symbol, I should only throw ticks through CustomTicksAdd through indicators (they don't skip ticks)?

Will the services skip ticks as well as Expert Advisors?

 
It lacks this functionality
// Throws a glass, triggering a BookEvent event on the custom character
bool  CustomMarketBookSet( 
   const string        symbol,     // symbol 
   const MqlBookInfo&  book[]      // array reference
   );
I form synthetic cups. I would like to work with them as with conventional cups.
 

Forex is good, but I still don't understand how to make the tester work with Si futures on MOEX!?

I copied the history and instrument settings from the original, but the output is empty.

This is how the log looks like - I don't know how to interpret it

2017.10.14 21:23:55.365 2017.10.01 00:00:00   Si-12.17_custom has type Exchange Execution. The execution policy is set - Return
2017.10.14 21:23:55.368 Si-12.17_custom,M5: history cache allocated for 133714 bars and contains 1131 bars from 2017.09.21 10:00 to 2017.09.29 23:45
2017.10.14 21:23:55.368 Si-12.17_custom,M5: history begins from 2017.09.21 10:00
2017.10.14 21:23:55.372 Si-12.17_custom,Daily: history cache allocated for 464 bars and contains 7 bars from 2017.09.21 00:00 to 2017.09.29 00:00
2017.10.14 21:23:55.372 Si-12.17_custom,Daily: history begins from 2017.09.21 00:00
2017.10.14 21:23:55.375 Si-12.17_custom,H1: history cache allocated for 11142 bars and contains 98 bars from 2017.09.21 10:00 to 2017.09.29 23:00
2017.10.14 21:23:55.376 Si-12.17_custom,H1: history begins from 2017.09.21 10:00
2017.10.14 21:23:55.377 BR Splice: symbol to be synchronized
2017.10.14 21:23:55.377 BR Splice: symbol synchronized, 3624 bytes of symbol info received
2017.10.14 21:23:55.377 BR Splice: history synchronization started
2017.10.14 21:23:55.379 BR Splice: load 33 bytes of history data to synchronize in 0:00:00.000
2017.10.14 21:23:55.379 BR Splice: history synchronized from 2015.01.05 to 2017.10.13
2017.10.14 21:23:55.538 BR Splice,Daily: history cache allocated for 464 bars and contains 440 bars from 2016.01.04 00:00 to 2017.09.29 00:00
2017.10.14 21:23:55.539 BR Splice,Daily: history begins from 2016.01.04 00:00
2017.10.14 21:23:55.661 Si-12.17_custom,H4: history cache allocated for 2785 bars and contains 28 bars from 2017.09.21 08:00 to 2017.09.29 20:00
2017.10.14 21:23:55.661 Si-12.17_custom,H4: history begins from 2017.09.21 08:00
2017.10.14 21:23:55.856 BR Splice,H4: history cache allocated for 2785 bars and contains 1759 bars from 2016.01.04 08:00 to 2017.09.29 20:00
2017.10.14 21:23:55.856 BR Splice,H4: history begins from 2016.01.04 08:00
 

Greetings!
I am making a synthetic index based on linear convolution of several instruments. (SYMBOL1*X1+SYMBOL2*X2+....SYMBOLn*Xn).
I was planning to visualise it through an indicator, but I came across custom symbols, I think it will be much more convenient for perception.
I do it through tick functions (CustomTicksUpdate).

I can't get the custom symbol to "tick", is there somewhere an example of implementing this task exactly through tick data?

I do it very simply: I created a symbol, and then in the script.

   MqlTick tick[];
   ArrayResize(tick, 1);
   tick[0].ask=indexAsk;
   tick[0].bid=indexBid;
   tick[0].flags=TICK_FLAG_BID|TICK_FLAG_ASK;
//---
   CustomTicksUpdate("ARBINDEX",tick);

Where indexAsk and indexBid are my calculated prices.
I thought that if I run this script on any instrument several times, I will form some history of quotes on my symbol, but there is "Waiting for update".
My build: 1643
I would be grateful for your help.

 
bistreevseh:

My build: 1643

Take 1653 (there are significant changes there on this topic) and if it doesn't work, post here.