Transition of positions after 0:00 when the bank is operating. How to identify? Need help from the hall. - page 3

 

What's a magik for a position?

Only warrants have magiks

 
VBAG:

Essence of the problem.

When working with the bank(s) at 23:59 all positions are closed with the comment [rollover close] and immediately opened with [rollover open]. This in itself is not new.

But the newly opened positions(orders) contain new ticket numbers and the field MAGIC contains 0. But before the rollovera MAGIC was !=0.

The question is.

How should we track positions after the 0? What is the most reasonable algorithm for this, taking into account the peculiarities of MT5?

IMHO, if after the rollover neither a magician, nor a ticket, nor an identifier are saved (which is logical), then the situation is absolutely unsolvable from the client's side.

We should "tweak something in the conservatory", i.e. on the server side.

 
Dima_S:

IMHO, if after a rollover no magik, no ticket, no identifier is saved (which is logical in general), the situation is absolutely unsolvable programmatically from the client side.

We should "tweak something in the conservatory", i.e. on the server side.

It is understandable.

There is no guarantee that some bank or broker will not change the settings on the server side.

We would like to have a personal option in the order (position) which would be unavailable on the server side. This has been talked about for a long time on the forum on 4, but one can only hope that the developers will hear. ....

Although it's probably too late to "drink the barge".

 
Dima_S:

then - the situation is completely unsolvable programmatically on the client side.

Why? If nobody touches the magician, the situation is absolutely solvable on the client side.
 
TheXpert:
Why? If nobody touches the magician, the situation is perfectly solvable on the client side.
Well, if you cut chunks out of a sentence, then yes - any situation is solvable))
 
Dima_S:
Well, if you cut chunks out of a sentence, then yes - any situation will be solved))
Okay. It's solvable now. Without changing the terminal.
 
TheXpert:
Okay. Everything is solvable now. Without changing the terminal.
(Perfect. The topic can be deleted))
 
Dima_S:

IMHO, if after a rollover no magik, no ticket, no identifier is saved (which is logical in general), then the situation is absolutely unsolvable from the client side programmatically.

We should "tweak something in the conservatory" - i.e. on the server side.

The situation can be solved, and not very hard.

If we go through history, we will monitor tickets of deals and orders with: zero magic, executed at 00:00, and having the word "rollover" in comments,

We create a list of tickers to be ignored, and in subsequent analysis simply do not take them into account.

After all, the position as a result of the rollover does not change, the margin of trades is not taken, and swap is not calculated.

And as a suggestion from MQ: to avoid such situations, introduce a standard (broker-configurable) rollover-trade filter. The filter parameters are set by the broker and enabled or disabled by the user.

 
Urain:

After all, the position does not change as a result of the rollover, no margin is taken on the trades, and no swap is charged.

Swap is accrued (implicitly) by changing the opening price (over-opening)
 
Man, just put it down to reopening and that's it, why make something up ))
Reason: