Questions from Beginners MQL5 MT5 MetaTrader 5 - page 511

 
elibrarius:

I can set the mode, but the Expert Advisor needs to know in which mode (at prices) it is running when testing.

I can think of only 1 option,

if it was only 1 tick within a bar, then - by prices,
if it was 4 ticks at 0, 20,40,59 seconds - ohlc
otherwise - all ticks.

But I'm afraid there may be variants that will coincide with someone else's condition to determine the type
Maybe there is a simpler variant?

Are you creatinga grail?
 
Victor Nikolaev:
Creating a grail?
Let's not get bogged down in arguments about grails. A lot has already been said about them.
There is a specific technical question that needs to be solved as reliably as possible.
 
elibrarius:

I can set the mode, but the Expert Advisor needs to know in which mode (at prices) it is running when testing.

I can think of only 1 option,

if there was only 1 tick during a bar, then it would be opened at prices,
if there were 4 ticks at 0, 20,40,59 seconds - ohlc
otherwise - all ticks.

But I'm afraid there may be variants that will coincide with someone else's condition to determine the type
Maybe there is an easier option?

As far as I know, you can't define directly, only indirectly, like your option. Basically, for M5 and above it's definitely good, as there may be no ticks coming in at night on M1. Or you have to monitor it all the time.
 
elibrarius:
Let's not get bogged down in speculation about grails. A lot has already been said about them.
There is a specific technical issue that needs to be resolved as reliably as possible.
On M5 and above, it's possible to identify them somehow. And not at all of them. Sometimes there are no ticks for half an hour. It will not be possible to do it on the minutes.
 
Victor Nikolaev:
On the M5 and above, you can still tell somehow. And not all of them. Sometimes there are no ticks for half an hour. It will not be possible to do it on the minutes.
On the minutes the statistics should be accumulated. The time flies quickly in the tester, let it determine the mode for the first few hours.
 
Alexey Volchanskiy:
On the minutes, you need to accumulate statistics. In the tester time flies fast, let the first few hours determine the mode.

Bars and ticks are simulated in the tester, if there are no ticks for a few minutes, bars will not be generated in the tester. And if a bar is generated, it will be according to the algorithm.

I wonder, for a bar with 1 tick, in ohlc mode the algorithm will create 4 ticks Open, High, Low, Close all with the same price? And for "all ticks" - how many ticks will be generated?

 
elibrarius:

Bars and ticks are modelled in the tester, if there are no ticks for a few minutes, no bars will be generated in the tester. And if a bar is generated, it will be by the algorithm.

I wonder, for a bar with 1 tick, in ohlc mode the algorithm will create 4 ticks Open, High, Low, Close all with the same price? And for all ticks - how many ticks will be generated?

Apparently, the volume of the bar will be the same amount of ticks.
 
elibrarius:

Bars and ticks are modelled in the tester, if there are no ticks for a few minutes, no bars will be generated in the tester. And if a bar is generated, it will be by the algorithm.

I wonder, for a bar with 1 tick, in ohlc mode the algorithm will create 4 ticks Open, High, Low, Close all with the same price? And for "all ticks" - how many ticks will be generated?

And the algorithm is published, here study https://www.mql5.com/ru/articles/75. Often there are bars in the form of horizontal dashes in real trading at night - this is about the 1st tick...
Алгоритм генерации тиков в тестере стратегий терминала MetaTrader 5
Алгоритм генерации тиков в тестере стратегий терминала MetaTrader 5
  • 2010.05.21
  • MetaQuotes Software Corp.
  • www.mql5.com
MetaTrader 5 позволяет во встроенном тестере стратегий моделировать автоматическую торговлю с помощью экспертов на языке MQL5. Такое моделирование называется тестированием экспертов, и может проводиться с использованием многопоточной оптимизации и одновременно по множеству инструментов. Для проведения тщательного тестирования требуется генерировать тики на основе имеющейся минутной истории. В статье дается подробное описание алгоритма, по которому генерируются тики для исторического тестирования в клиентском терминале MetaTrader 5.
 

No one wants to write an EA for me. They don't want to help newcomers.

 
popovei:

They do not want to help newcomers, so they do not want to bother with MQL.

On the forum, people seldom bother with it. If you do not know how to use it, you will get busy.

https://www.mql5.com/ru/job

Фриланс-сервис на MQL5.com
Фриланс-сервис на MQL5.com
  • www.mql5.com
Заказы на разработку программ для трейдинга
Reason: