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

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Got the same thrill.) In my metropolis, instead of nuts, there are magicians, identifiers and comments. ))
Oops! Are the comments replaced on rollover?! If replaceable, is it realistic to make the broker's comment not replace my comment, but complement it? For example, like this:
my_comment; broker_comment
Otherwise, it's a stick in the wheel.))
To do this, you need to unify comments (something like [rc]/[ro]) and add them to the existing info.
At the same time, forbid brokers to show initiative.
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.
If after the rollover, for some reason the new position has a volume of 1.2, then 0.1 lot is excessive and should be closed.
Can the rollover also change the volume of the position?
Why is it not solvable? The only way is to keep your own database. After the rollover, update it. For example, before the rollover, a 1.1 lot position with magic number "134829" was opened and is shown in the database. After the rollover, this position disappeared and a new position appeared: 1.1 lot with magic number "0". The question is what is the difference between these positions? We just record in our database that our aggregate position corresponds to the current MT5 aggregate position and that's it. If after the rollover, for some reason the new position volume is 1.2, then 0.1 lot is excess and must be closed. In this case neither master nor comment nor other identification information is needed.
When trading hands, do you have to keep 10 bases too?
Why is it not solvable? The only way is to maintain your own database. After the rollover, it must be updated. Example, before the rollover, a 1.1 lot position with magic number "134829" was opened which is shown in the database. After the rollover, this position disappeared and a new position appeared: 1.1 lot with magic number "0". What is the difference between these positions? We just record in our database that our aggregate position corresponds to the current MT5 aggregate position and that's it. If after the rollover, for some reason the new position volume is 1.2, then 0.1 lot is excess and must be closed. In this case neither a comment nor a magik or other identification information is needed at all.
This method can work correctly if there is only one EA master running in the terminal. That's not even the point, the rollover should be handled correctly by standard means without any bases.
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 newly opened positions(orders) contain new ticket numbers and the field MAGIC contains 0. But before rollovera MAGIC was !=0.
The question is.
How should we track positions after the 0? What is the most reasonable algorithm for this considering the peculiarities of MT5?
The money disappears at midnight, almost without a trace under the code word ROLLOVER. After 00 hours, no money and no story about it!
You have not yet traded on Quik - on the futures market the opening price is only until the end of the session in the order history, on stocks it is always there, but if you short, then the price is set at the market opening price for the next day. And there is no order history at all, only the broker sends us a report by e-mail.
So, I wouldn't be too dramatic about ROLLOVER, although it has some small glitch. And the "Balance" indicator is bad for the investor's health...