Bid && Ask && Spread - page 9

 
In fact, even the maximum spread is a half-measure. Ask history is as important as Bid. I personally came to the conclusion that when working on sell, you should work with Ask history, and on buy with Bid. In the past, you could allow one Bid because the spread was mostly fixed. Now everything is different. And plus hrenfx is correct - bid and ask history is normal testing.
 
MetaDriver:

The maximum spread can be anywhere on the bar. In fact, think again.

For five-minute bars you have to specify the maximum of the minute bars ?

And for Hourly? Doesn't that logic make it crazy?


In five-minute bars, one-hour bars, etc., no spread makes sense!

Don't you fall into the trap of thinking that every timeframe (except the one minute) has a constant spread? Very often people don't understand what a "spread in every minute" is and conclude that "on any other timeframe the spread is also fixed".

The initial historical data in MT5 is stored only in minutes, from which all other timeframes are built. When modelling a watch, 60 different spreads will be used from the 60 minutes that make up that hour.

 
220Volt:
There is a very important point - the spread is not just for testing!!! And if you can't enter the Ask story, it's better to enter the maximum spread than the average. In fact, the maximal spread will give a high Ask, and the average one is not understandable at all. So, how to deal with levels? After all, the stops will be triggered by the Ask during selling. And to understand where the asc is in the past, we need the maximal spread.
I'm sorry, I did not write it right. I'm sorry, I was wrong. Maximal spread will not give us high asc. Hence personally useless to me, just a testing gimmick. Only need asc history !!!!
 
Renat:

1. In five minute, hourly etc bars no spreads make sense!

2) Don't you fall into the trap of thinking that every timeframe (except the one minute) has a constant spread? Very often people do not understand what is a "spread in every minute" and conclude that on "every other timeframe the spread is also fixed".

3. The initial historical data in MT5 is stored only in minutes, from which all other timeframes are built. When modelling the hour, 60 different spreads will be used from 60 minutes, which make up that hour.

1. they do - when using quick testing, when the "inside" of the bar is deliberately ignored (widely applicable for a quick estimation of the strategy possibilities). I also have my own calculator (and not one already), and it takes data about the spread from the current timeframe. Each bar of all timeframes has a Spread field, and so far I have been relying on its contents to correspond to the average spread for, respectively, 5 minutes, an hour, or a week.

I do not seem to have fallen into such a trap. I understand that the "bar" is only a way to store and display historical data, the question is only the usability and informativeness of this method.

I respect your tester a lot, but I will respect it even more when methods suitable for high-speed (though not quite accurate) optimization will appear. And these methods imply an allowable simplification of input data. And here the question about suitability of data format of all timeframes to be used for generation of simplified tick sequences arises. If it does not arise for you - it does for me. :)

 

A concrete example showing the shortcomings of Ask price modelling:

  1. The BuyLimit stands at 1.3002.
  2. A new bar comes in, the characteristics of which by the end were as follows:
  3. The Bid price changed within a minute from 1.2995(Low) to 1.3000(High).
  4. The Ask price varied during the minute from 1.3001(Low) to 1.3005(High). I.e. on the demo on this bar BuyLimit should have worked.
  5. The maximum (on the opening) spread on the bar was 8 points.
  6. The tester shows that Ask varied from 1.3003(Low) to 1.3008(High). Obviously, the BuyLimit in the tester will not work according to this scheme of Ask-price modelling.

Here is a simple perfectly concrete example of when the tester is inaccurate. Obviously, if the tester had real data on the Ask price, it would show Limit triggering, as it did on the demo.

So is the tester accurate when it shows discrepancies with the greenhouse conditions of the demo?

Обработчик события "новый бар"
Обработчик события "новый бар"
  • 2010.10.04
  • Konstantin Gruzdev
  • www.mql5.com
Язык программирования MQL5 позволяет решать задачи на совершенно новом уровне. Даже те задачи, которые уже вроде имеют решения, благодаря объектно-ориентированному программированию могут подняться на качественно новый уровень. В данной статье специально взят простой пример проверки появления нового бара на графике, который был преобразован в достаточно мощный и универсальный инструмент. Какой? Читайте в статье.
 

I have said several times that MT5 with its asynchrony is a complete trading platform. This is not entirely true, because I have missed an important element, without which no trading platform can be complete.

The datetime type, in which the time of the last quote arrives, has a discreteness of one second. Unfortunately, this is a very crude estimation of time, which does not allow implementing many trading strategies.

Moreover, in MT5 there is no concept of a tick, there is a concept of the time of the last quote. It is almost the same thing, but not quite. A very important characteristic of a tick is the time of its birth - the time when the tick appeared at the source of that tick. This is not at all the time when it entered the MT5 platform system - the MT5 server (not the terminal). Of course, the birth time of the tick should be set to the nearest millisecond, as is customary in many platforms.

The actuality of a tick is determined by the time of its birth, and not by its arrival to the MT5 platform. Moreover, when it is received in the terminal, it should always be possible to determine its age, which unfortunately cannot be done now because of the coarse discreteness of datetime type.

The relevance of ticks is important in synchronous multicurrency strategies. For example, when you need to open several FI simultaneously.

Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация об инструменте
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация об инструменте
  • www.mql5.com
Стандартные константы, перечисления и структуры / Состояние окружения / Информация об инструменте - Документация по MQL5
Reason: