Bid && Ask && Spread - page 6

 
220Volt:

Or here's an option:

Exceeding the standard structure by 8% (weighs 52 bytes), 65536 ticks. I doubt there is such a spread somewhere

Nah, won't fit a small spread (if the bid is bigger than ask). Anyway, hmmm.
 
220Volt:
No, the stock is small.

Well, that's for the developers with the current implementation to say then:

   int      spread;       // спред
 
hrenfx:

Well, that's for the developers with the current implementation to say then:

Is Bid always smaller than Ask? )))
 

In theory, not always. In practice, what is history for? Probably so it can be adequately analysed. I don't think you need a story where the spread is negative (but you wouldn't be able to trade arbitrage anyway).

So the spread would definitely not be negative on bars. Even if they allow creating custom history, I see no logical reason to introduce a negative spread for bars.

By the way, in the current situation of MQLRates, the spread for bars is written as a spread at the opening, and it (the probability is negligible) may be negative at that moment. I.e. it is quite possible that a bar with a negative spread will occur at some broker. Which, of course, is nonsense.

Документация по MQL5: Стандартные константы, перечисления и структуры / Структуры данных / Структура исторических данных
Документация по MQL5: Стандартные константы, перечисления и структуры / Структуры данных / Структура исторических данных
  • www.mql5.com
Стандартные константы, перечисления и структуры / Структуры данных / Структура исторических данных - Документация по MQL5
 
In general, I also think that bid is more of an ask exception, hence the scheme is not bad. And compared to what we have now from ask history, the unsigned wchar_t will simply revolutionise it.
 
220Volt:

Or here's an option:

Exceeding the standard structure by 8% (weighs 52 bytes), 65536 ticks. I doubt there is such a spread somewhere

Got the size wrong. Standard structure = 60 bytes. My structure = 64 bytes, exceeds standard structure size by 6%.
 
Renat:

... or even maximum for the sake of more conservative/pessimistic testing.

Yes, it's better than the opening spread.
 
Lizar:
Yeah, it's better than the opening spread.

Maximum is not worth it. (Extreme is not an indicator.) The average is better.

// Pessemism is something we can do ourselves, we know how... :)

 
MetaDriver:

The maximum is not worth it. (Extreme is no indicator.) Medium is better.

That may be the case. I was based on my experience of testing and working on the account.
 
You can't have an average, as that would give non-existent prices, which is fatal.
Reason: