Analysis of test results and optimisation in the MetaTrader 5 strategy tester - page 11

[Deleted]  
@Ilya Malev #What is the reason for the need to upload not only ticks, but also to generate minute bars independently from them? What will be done wrong if we let Metatrader generate minute bars etc. from downloaded ticks automatically?

When adding ticks to a Custom Symbol, it does not generate the bar data automatically. You have to generate and add that too.

Otherwise you would not able to use Custom Symbol to generate "Renko", "Constant Range Bars", "Constant Volume Bars", or any other type of custom charting.

If I perhaps misunderstood your question due to the automated translations, please let me know.

 
Fernando Carreiro #:

When adding ticks to a custom symbol, bar data is not automatically generated. You must generate and add them too.

Otherwise you will not be able to use Custom Symbol to generate "Renko", "Constant Range Bars", "Constant Volume Bars" or any other type of custom charts.

If I may have misunderstood your question due to automatic translation, please let me know.

Strange, I only loaded the ticks from the source into the custom tool, and immediately opened charts on it, they were all generated automatically. I loaded the ticks through the standard menu Ctrl+U.

At this point I just want to make sure that the tester will not use the method of "generating ticks from minute bars". And if these ticks are not available, so that it just skips the period for which there are no ticks, using only cash "real ticks".

And I am also interested in the question, in what cases the tester (in the "No Delay, Perfect Execution" mode), when executing stop and limit orders, uses the price specified in the order as the position opening price, and in what cases it still uses slippage to the nearest real price (according to tick or minute data). Since I have seen both such and such situation in the tester, and I need to understand in which cases it executes "perfectly", and in which cases it slips to the nearest tick.

 

Can you tell me what this error is?


 
Ilya Malev #:

I have seen this and this situation in the tester

I have seen only one - the order is executed at tick price.
[Deleted]  
Ilya Malev #Strange, I only loaded the ticks from the source into the custom tool, and immediately opened charts on it, they were all generated automatically. I loaded the ticks through the standard menu Ctrl+U.

My explanation was meant for when loading ticks via MQL5 code, not the via the user interface (i.e. Ctrl-U). However, I may be wrong, because I have not tested this on more recent builds of MetaTrader.

[Deleted]  
Ilya Malev #Can you tell me what this error is?

I have seen this before when the imported ticks do not have the "flags" properly set, and consecutive ticks have the same price quotes with no change between them. For example, when user load tick data from an external source that does not have the "flags" column defined. However, that is the only time I have seen that message. There may be other reasons.

 
Fernando Carreiro #:

When adding ticks to a Custom Symbol, it does not generate the bar data automatically. You have to generate and add that too.

Otherwise you would not able to use Custom Symbol to generate "Renko", "Constant Range Bars", "Constant Volume Bars", or any other type of custom charting.

If I perhaps misunderstood your question due to the automated translations, please let me know.

Fernando Carreiro #:

My explanation was meant for when loading ticks via MQL5 code, not the via the user interface (i.e. Ctrl-U). However, I may be wrong, because I have not tested this on more recent builds of MetaTrader.

Adding ticks to a custom symbol should always update or create corresponding bars properly. Usually you don't need to generate rates in addition to ticks. But you're right that you may need to fix special bars such as renko (because they are not standard bars).

If you see some cases it's not so, report a bug. Custom symbols in MT5 are errorprone unfortunately.

Please, note that MT5 is an async multithreaded thing, so I think it may take a fraction of time to autogenerate bars based on newly added ticks.

NB: read in English for the original post.

[Deleted]  
Stanislav Korotky #Adding ticks to a custom symbol should always update or create corresponding bars properly. ... If you see some cases it's not so, report a bug. Custom symbols in MT5 are errorprone unfortunately.

Please, note that MT5 is an async multithreaded thing, so I think it may take a fraction of time to autogenerate bars based on newly added ticks.

During the times that I have generated Custom Symbols from ticks, I never noticed any bars being generated automatically. Maybe I was not paying much attention, so I will do so next time to confirm. Thank you for the correction!

Original text in English!

 
Fernando Carreiro #:

During the times that I have generated Custom Symbols from ticks, I never noticed any bars being generated automatically. Maybe I was not paying much attention, so I will do so next time to confirm. Thank you for the correction!

Original text in English!

You can check this matter using, for example, the script CustomSymbolFilterTicks.mq5 from the algotrading book. The script generates a custom symbol with filtered subset of ticks (with CustomTicks* calls), and CustomRates* APIs are not involved during the generation.
MQL5 Book: Advanced language tools / Custom symbols / Adding, replacing, and removing ticks
MQL5 Book: Advanced language tools / Custom symbols / Adding, replacing, and removing ticks
  • www.mql5.com
The MQL5 API allows you to generate the history of a custom symbol not only at the bar level but also at the tick level. Thus, it is possible to...
 
fxsaber #:
I don't remember anymore.
Checked, it matches: using only one CustomTicksReplace is enough.
Библиотеки: TicksShort
Библиотеки: TicksShort
  • 2025.09.26
  • www.mql5.com
Статьи и техническая библиотека по автоматическому трейдингу: Библиотеки: TicksShort