[Bug in MT5] In the backtest, if multiple partial settlements are made in one minute, the execution report will not be displayed correctly.

 


Trading history in visual mode is displayed correctly




But when I look at the backtest report...



The order type is bonus and the quantity is 0.

I made a partial close with PositionClosePartial, but if you do it multiple times in the same time period, this kind of phenomenon may occur.


Probably, the quantity of the start of the hour and minute will be summarized, and the quantity after the second will be a bonus notation and the quantity will be 0.

I've tried it on multiple PCs and it's the same issue.


Can you reproduce it in your environment?

I also attach the source code.

Expect bug fixes.
Files:
test.mq5  9 kb
 

I have run your sample code but I was unable to reproduce your issue.

However, your code has some bugs. They may be warnings but there are actual logic bugs associated with them.

 
Can you tell me your version of MT5? .

BONUS not showing up in the backtest report?

I tried verifying with multiple people, multiple currency pairs, and multiple brokers, but it's reproduced...

I fixed the error, but the result was the same.

It happened with my EA, so I made a test version.
Files:
test2.mq5  8 kb
 
jo100ss #: Can you tell me your version of MT5? BONUS not showing up in the backtest report? I tried verifying with multiple people, multiple currency pairs, and multiple brokers, but it's reproduced... I fixed the error, but the result was the same. It happened with my EA, so I made a test version.

If you say that you were able to reproduce it with others, then please provide more specific information on how you ran those tests. Here are mine (done on my broker's demo account) ...



 

Thank you for testing.

Even in the same environment, it was not fixed in my environment, but it was improved in build 3550 on Friday.
thank you very much.

 
jo100ss #: Thank you for testing. Even in the same environment, it was not fixed in my environment, but it was improved in build 3550 on Friday. thank you very much.
You are welcome!
Reason: