Errors, bugs, questions - page 3116

 
JRandomTrader #:

Apparently it's FORTS and Balance type trades? The broker's helpdesk is out of touch and nods to MQ, and MQ doesn't see it as a problem.

No, as far as I'm concerned it's normal Forex.

The deal is not closed, but I looked in the History tab just in case:

History

There's only one entry. Type: balance. But, for example, on MQ servers demo also has type: balance, but the balance never walks.

Crawled away google...

Upd: dug uphttps://www.mql5.com/ru/forum/326941. Not everything is clear, but some things are...
Что за тип "balance" в истории терминала.
Что за тип "balance" в истории терминала.
  • 2019.11.21
  • www.mql5.com
Добрый день...
 

Two long trades on the MQ demo on the BTCUSD symbol: 1st with 1.01 lot, 2nd with 11.01 lot. Leverage: 1:500. After opening the first one the margin level was quite adequate (I didn't remember and didn't have time to write it down, but somewhere around 100000); after opening the second one:

BTCUSD Margin

that is, it increased by orders of magnitude, although by my understanding it should have decreased by a factor of ten. I can't say for sure, but I think it's the same in MT4 on crypto.

Is it a crypto-bug or is it designed that way?

 

x572intraday #:

Cryptobug or is it designed that way?

a $0.01 bail for 12 bits? of course it's a bug
 

Hello!

char is a signed type from -128 to 127, why does it change its type from char to int when a "-" is substituted?

Is it something I don't understand, and the conversion of tia appears for a reason? Or is it a bug? (attached warning.png file)

void OnStart() {
  char positive = 1;
  char negative = -positive;
}


No such conversion to an older format is observed for int. And I can't figure out the type conversion when changing sign yet...

void OnStart() {
  int positive = 1;
  int negative = -positive;
}
Files:
warning.png  29 kb
int.png  22 kb
truncation.png  25 kb
 
NastyaMaley #:

Zero tick, how is that possible? An error in the tester?

We write a simple code for the tester.

The output is:

....

Logically, if the last tick is zero, it should not generate anything. But it produces a zero tick, which leads to a failure in calculations of the EA, for example, when calculating the average. (13000 + 0 + 13000) / 3 = 8667, although it should be (13000 + 13000) / 2 = 13000. Because of the zero tick we got 8667 instead of 13000 !!!

did you check what SymbolInfoTick returns? if false, check LastError

 
Aleksey Mavrin #:

Have you checked what SymbolInfoTick returns? If false, check LastError


Returns true everywhere

2021.12.16 00:21:02.461 Core 1 2021.11.08 00:00:00 2021.11.08 00:00
2021.12.16 00:21:02.461 Core 1 2021.11.08 00:00:00 true
2021.12.16 00:21:02.461 Core 1 2021.11.08 00:00:03 2021.11.08 00:00:03
2021.12.16 00:21:02.461 Core 1 2021.11.08 00:00:03 true
2021.12.16 00:21:02.461 Core 1 2021.11.08 00:00:04 2021.11.08 00:00:04
2021.12.16 00:21:02.461 Core 1 2021.11.08 00:00:04 true

... and so on

Of course, we could add a condition, if trade.last == 0, then we ignore the average calculation. But still I would like to get to the bottom of what causes the zero .last Tick history is clear and there are no ticks that == 0.
 
NastyaMaley #:


Returns true everywhere

2021.12.16 00:21:02.461 Core 1 2021.11.08 00:00:00 2021.11.08 00:00:00
2021.12.16 00:21:02.461 Core 1 2021.11.08 00:00:00 true
2021.12.16 00:21:02.461 Core 1 2021.11.08 00:00:03 2021.11.08 00:00:03
2021.12.16 00:21:02.461 Core 1 2021.11.08 00:00:03 true
2021.12.16 00:21:02.461 Core 1 2021.11.08 00:00:04 2021.11.08 00:00:04
2021.12.16 00:21:02.461 Core 1 2021.11.08 00:00:04 true

... etc.

Of course, we could add a condition, if trade.last == 0, then we ignore the average calculation. But still I would like to get to the bottom of what causes the zero .last Tick history is clear and there are no ticks that == 0.

I don't use trade.last and don't check it, but I do use trade.ask and trade.bid, and I have to check them to 0 otherwise I may get hurt.

 
NastyaMaley #:

At the same time there are no zero ticks in the tick history. Here is a piece of history for zero seconds 2021.12.09 00:00:0 This is the CME EU6Z21 euro contract

"<DATE> <TIME> <BID> <ASK<LAST> <VOLUME> <FLAGS>"
"2021.12.09 00:00:00.034 1.13445 2"
"2021.12.09 00:00:01.607 1.13445 1.00000000 88"
"2021.12.09 00:00:01.607 1.13445 1.00000000 88"
"2021.12.09 00:00:01.608 1.13445 1.13450 6"
"2021.12.09 00:00:01.660 1.13440 2"

here you have zero flippers all over the place.

the fact that there are several such ticks per day at 00:00 may be due to non-trading ticks at the time of the quote/non-trading session.

what kind of broker?

 
Maksim Astafev #:

Hello!

char is a signed type from -128 to 127, why does it change its type from char to int when a "-" is substituted?

Is it something I don't understand and the tia conversion appears for a reason? Or is it a bug? (attached warning.png file)


No such conversion to an older format is observed for int. And I can't figure out type conversion when changing a sign yet...

What's the problem?

Read the documentation.

The char, uchar, short and ushort data types are unconditionally converted to int in operations.

Документация по MQL5: Основы языка / Типы данных / Приведение типов
Документация по MQL5: Основы языка / Типы данных / Приведение типов
  • www.mql5.com
Приведение типов - Типы данных - Основы языка - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Slava #:

What's the problem?

Read the documentation.

It should be in large font and in red) I've only just noticed too.

Reason: