MetaTrader 5 Strategy Tester: bugs, bugs, suggestions for improvement - page 30

 

In pips mode equity is taken from the ceiling.


EA for playback.

#include <MT4Orders.mqh> // https://www.mql5.com/ru/code/16006

#define  Ask SymbolInfoDouble(_Symbol, SYMBOL_ASK)

int OnInit() { return(OrderSend(_Symbol, OP_BUY, 0.1, Ask, 0, 0, 0) == -1); }
 

I would like to add to the message above that in the backtest the net profit and total profit are also reported incorrectly, and, as a consequence, so is the expected payoff. The final balance is incorrect in the log.

exchange buy 1.00 PLZL at 6659.0 (6460.0 / 6659.0 / 6460.0)                             
deal #2  buy 1.00 PLZL at 6659.0 done (based on order #2)                                
 deal performed [#2  buy 1.00 PLZL at 6659.0]                             
order performed buy 1.00 at 6659.0 [#2  buy 1.00 PLZL at 6659.0]                         

position closed due end of test at 7093.0 [#2  buy 1.00 PLZL 6659.0]                             
deal #3  sell 1.00 PLZL at 7093.0 done (based on order #3)                               
 deal performed [#3  sell 1.00 PLZL at 7093.0]                            
order performed sell 1.00 at 7093.0 [#3  sell 1.00 PLZL at 7093.0]                               
final balance 104340.00 pips                            

In orders and trades, the profit and balance are incorrect, too. Maybe, there may be something else I haven't noticed at once.

It seems somewhere else there is unnecessary recalculation in/from pips and adding up bricks and bats.

Files:
zfpcvs5fjq.png  16 kb
 
Ivan Titov:
I send both in trade request and in function call the same volume (other parameters are the same too). But the function returns one value, and the free margin decreases by another value after the trade request is executed. There are no other pending orders or open positions.

Please mql5 code that can be compiled and run. Description on which character and on which server, on which date.

 

Why does the visual tester show the same profit with different lots and the same opening and closing prices?



 
Ivan Titov:

Why do different lots and the same opening and closing prices show the same profit in the visual tester?



Because someone set the parameter without thinking:


 
Vladimir Karputov:

Please mql5 code that can be compiled and run. Description on which symbol and on which server, on which date.

Code and screenshots of the test attached. Otkritie broker, Open-Demo: Demo account


Files:
 

Clarification to #258:

At first startup the terminal doesn't appear for about 5 minutes. This did not happen at first. This happens if a tester has been opened.

 

I put Win10 in VirtualBox, ran the agent in it, but on the host terminal I can't transfer the job to the agent, the agent is "ready" and optimisation is not going, tester's log:

.........................................................................................................

2019.11.22 18:32:47.821 Agent_192.168.1.5:2000 connecting to 192.168.1.5:2000

2019.11.22 18:32:50.118 Agent_192.168.1.5:2000 connecting to 192.168.1.5:2000

2019.11.22 18:32:52.317 Agent_192.168.1.5:2000 connecting to 192.168.1.5:2000

2019.11.22 18:32:54.421 Agent_192.168.1.5:2000 connecting to 192.168.1.5:2000

2019.11.22 18:32:56.385 Tester result cache used 0 times

2019.11.22 18:32:56.385 Tester genetic optimization finished on pass 0 (of 158327079526)

2019.11.22 18:32:56.385 statistics optimization done in 1 minutes 33 seconds

2019.11.22 18:32:56.385 Agent_192.168.1.5:2000 connection closed

2019.11.22 18:32:56.385 Tester stopped by user

Here's a screenshot of the agent on the virtual machine and the log:

what am i doing wrong?

why is agent's logged address 0.0.0.0 instead of 192.168.1.5 configured in metatester64 manager?

 
@Vladimir Karputov, please expedite consideration of the problem, a major job depends on it.
Тестер стратегий MetaTrader 5: ошибки, баги, предложения по улучшению работы
Тестер стратегий MetaTrader 5: ошибки, баги, предложения по улучшению работы
  • 2019.11.21
  • www.mql5.com
В настоящий момент тестер стратегий MetaTrader 5 подвергается глубокой переработки командой MQ...
 
Please display milliseconds when viewing the single pass trading history.