Features of the mql4 language, subtleties and techniques - page 28

 
Is the option of not trading where tickets can get lost not an option?
 
trader_number_one:
Is the option of not trading where tickets can be lost not an option?

No, as it is not possible to determine in advance where tickets may be lost.

 
fxsaber:

On MT4 this situation is possible (we will not talk about the reasons):

  • A position is open. The balance is equal to N.
  • From a certain moment the positions disappear. Equity and balance are equal to N. In the history of trades, there is no information about the position.
  • Terminal resetting does not help.
  • Several hours later the positions appear in the trading history (they closed under a certain condition). The balance and equity are adjusted accordingly.

This is a very rare situation caused by a confluence of many circumstances. But it can occur, even though the probability is about zero.

I suggest that all combat robots must have a mechanism for identifying such situations.

For this purpose, it is necessary to memorize the tickets of open orders and check their presence in the trade history in case of their disappearance. If they are not in the trading history, Alertim!


The function of such protection.

Call CheckTickets() at the beginning of OnTick.

The situation repeated itself (one ticket disappeared (for several hours) when TP was executed). And maybe it's the Terminal, as everything is in place on the Server (dealt with the broker).

Obviously, this situation went unnoticed by everyone, as no one did such a specific check. Yes and one has to trade quite actively to statistically come across this with non-zero probability.


Unfortunately, I did not catch the moment when the ticket appeared in the history.

 
fxsaber:

Unfortunately, I didn't catch the moment when the ticket appeared in history.

It happened again. After the re-login. It's almost 100% safe to say:

  • MT4 Terminal loses tickets.
  • If this happens, it is desirable to make a forced re-login.
 
fxsaber:

The situation repeated itself (one ticket disappeared (for several hours) during TP execution). And maybe it's the Terminal, as everything is in place on the Server (dealt with the broker).

Obviously, this situation went unnoticed by everyone, as no one did such a specific check. Yes and one has to trade quite actively to statistically come across this with non-zero probability.


Unfortunately, didn't catch the moment when the ticket appeared in the history.

Caught the situation! Took another Terminal and entered the same account. Didn't touch the old Terminal though.

Click to see animation. Didn't do it as a picture on purpose, so as not to get photoshoped claims.

On the left there is no order in the history, on the right there is.


Re-login, of course, solved the problem. Unacceptable bug for the trading terminal!

 

Just found out that H1 bars can have times that are not a multiple of an hour:


Clearly, this is more of a broker feature than MT, but this fact will now have to be taken into account...

 
You're lying. On MT4 it's impossible, on MT5 it's not a problem. Yes, H1 bars can have times that are not multiples of an hour. Do you want to go 8 pixels to the left?
 
Алексей Тарабанов:
You are lying. On MT4 it's impossible, on MT5 it's not a problem. Yes, H1 bars can have time not a multiple of an hour. Do you want it 8 pixels to the left?

Alexei, I haven't been able to make sense of any of your posts for a very long time now. Developed the habit of skipping them so as not to waste time.

Don't bother answering my posts, please.

 
Andrey Khatimlianskii:

Just found out that H1 bars can have times that are not a multiple of an hour:


Obviously, this is more of a broker feature than MT, but this fact will now have to be taken into account...

Is the time the same in the"Data window"?

 
Andrey Khatimlianskii:

Just found out that H1 bars can have times that are not a multiple of an hour:

It is clear that this is more of a broker feature than MT, but now I have to take this fact into account...

It is - broker feature, came across it when syncing H4 and D1 bars for different brokers.


Синхронизация баров H4 и D1 для разных брокеров.
Синхронизация баров H4 и D1 для разных брокеров.
  • 2019.01.09
  • www.mql5.com
Начал делать индикатор который будет использовать H4 и вот задумался, как луче синхронизировать для разных брокеров...