Errors, bugs, questions - page 1943

 
Anton Ohmat:

2 questions.

1. How to display stop values in MT5 as it was in MT4. It became very uncomfortable. Since I cannot even see the history of stops for a deal. They are only displayed separately in orders, can I check it somehow?

2. What quotes does the agent use when testing - my terminal or my own quotes downloaded by the symbol? I am asking because I have often noticed differences between the agent test results and the one on my PC

1. There is no modification history of TakeProfit and StopLoss. The current value of TakeProfit and StopLoss is always displayed. If you want to see how TakeProfit and StopLoss have moved, do it yourself. Thank goodness forPOSITION_REASON,DEAL_REASON andORDER_REASON properties

The Strategy Tester uses the trade history from the trade server to which you are logged into the terminal.


Anton Ohmat:
And a question. Is it possible to specify something in the EA during testing so that the backtest would select at once, for example, the output of orders and deals by default. It is not convenient to have to click 100-200 times an hour during debugging.

No, you cannot.

Anton Ohmat:

It seems that the glitch is that the objects are not displayed at all during a single test, only during visualization objects are displayed on the screen. The terminal updated itself today ((((((

Maybe you can test it more before updating the software. Took me a couple of hours before I thought it was a glitch in the terminal


Before calling something a "glitch", you should read the documentation(Features of Testing - Algorithmic Trading, Trading Robots) - read the whole section.

AntonOhmat:

A common problem. When 1-2 agents hang and do not count anything. I am getting tired of this problem - the entire test hangs, which means the loss of time and money on the test(.

I'm really sick of this problem - is there any way to fix it, for example, if an agent counts slower than 200-300 other agents, then either do not wait for it or exclude it completely. Tests fail on 500-600 runs.

As a way out of the situation - manually turn off and then on and everything works until some slowing down agent and then all over again.

Work with your code - 99.9% - you have a log full of errors such as "no money to open a position".

Anton Ohmat:

Please advise how to sift values with large drawdown from optimization results, as it was in mt4


Strategy Tester -> tab "Optimization" -> double click on the row title "Drawdown, %" will sort the test results by increasing/decreasing drawdown.

 
Anton Ohmat:

A common problem. When 1-2 agents hang up and don't count anything. As a result, the whole test hangs, respectively, loss of time and money on the test(.

Really sick of this problem - is there any way to fix it, for example, if an agent counts slower than 200-300 other agents, then it either does not wait or exclude it completely. Tests crash on 500-600 runs.

As a way out - manually turn off and then on and everything works until some lagging agent and then everything again

Try to do OrderSend only after successfulOrderCheck. If it doesn't help, go to SR.

 

The Expert Advisor is compiled under 1641, which has a fast trading history.

Is it possible during the optimization to get to the Agent of build 1596, where the history is working VERY slowly, and therefore the optimization is slowed down many times?

 

Forum on trading, automated trading systems and strategy testing

Libraries: TesterBenchmark

fxsaber, 2017.07.24 14:13

We take the EA from the delivery and run it in the tester, getting this performance data

------
OnTesterInit
i = 0 Pass = 0 OnTester = 2.231 s.: Count = 3387955, 1518581.4 unit/sec, Agent = C:\Program Files\Alpari Limited MT5\Tester\Agent-127.0.0.1-3000 build = 1641
i = 1 Pass = 1 OnTester = 2.214 s.: Count = 3387955, 1530241.6 unit/sec, Agent = C:\Program Files\Alpari Limited MT5\Tester\Agent-127.0.0.1-3000 build = 1641
iMin = 1 Results[iMin] = 2.214 s.
iMax = 0 Results[iMax] = 2.231 s.
Amount = 2 Mean = 2.223 s. - 79.08%
OnTesterDeinit
------
Interval = 5.621 s., Count = 0, 0.0 unit/sec

Now let's run the same EA, but using Trade.mqh

------
OnTesterInit
i = 0 Pass = 0 OnTester = 3.330 s.: Count = 3387955, 1017403.9 unit/sec, Agent = C:\Program Files\Alpari Limited MT5\Tester\Agent-127.0.0.1-3000 build = 1641
i = 1 Pass = 1 OnTester = 3.475 s.: Count = 3387955, 974951.1 unit/sec, Agent = C:\Program Files\Alpari Limited MT5\Tester\Agent-127.0.0.1-3000 build = 1641
iMin = 0 Results[iMin] = 3.330 s.
iMax = 1 Results[iMax] = 3.475 s.
Amount = 2 Mean = 3.402 s. - 89.73%
OnTesterDeinit
------
Interval = 7.584 s., Count = 0, 0.0 unit/sec

It has turned out that Trade SB is 1.5 times slower than pure MQL5!

I assumed this was the reason so I made a small correction in Trade.mqh

//+------------------------------------------------------------------+
//| Access functions PositionSelect(...)                             |
//+------------------------------------------------------------------+
bool CPositionInfo::Select(const string & symbol)
  {
   return(PositionSelect(symbol));
  }

But the slowdown of the SB variant has not disappeared.

Where's the reason for the slowness of the SB?

 

Forum on trading, automated trading systems and strategy testing

Libraries: TesterBenchmark

fxsaber, 2017.07.24 14:24

That was Optimisation mode. And now THIS same EA, but in single run mode

Core 1  2017.07.21 23:59:59   Interval = 5.140 s., Count = 3387955, 659135.2 unit/sec
Core 1  EURUSD,M1: 3387955 ticks, 52608 bars generated. Test passed in 0:00:05.164.

Single run on local Agent is 2.3 times slower than on THIS same Agent, but during Optimization!


Perhaps it is the tester's sluggishness, so let's see what OnTick profiling will show (issues of execution and other trading environments will not affect the result) in the Optimization and Single Run modes.


Optimization

------
OnTesterInit
i = 0 Pass = 0 OnTester = 2.910 s.: OnTick Profiler: Count = 3387955, Interval = 0.969 s., 3496753.0 unit/sec , Agent = C:\Program Files\Alpari Limited MT5\Tester\Agent-127.0.0.1-3000 build = 1641
i = 1 Pass = 1 OnTester = 2.862 s.: OnTick Profiler: Count = 3387955, Interval = 0.952 s., 3559797.1 unit/sec , Agent = C:\Program Files\Alpari Limited MT5\Tester\Agent-127.0.0.1-3000 build = 1641
iMin = 1 Results[iMin] = 2.862 s.
iMax = 0 Results[iMax] = 2.910 s.
Amount = 2 Mean = 2.886 s. - 78.06%
OnTesterDeinit
------
Interval = 7.394 s., Count = 0, 0.0 unit/sec


Single pass

Core 1  2017.07.21 23:59:59   Interval = 6.149 s. (Profiler: Count = 3387955, Interval = 4.018 s., 843148.2 unit/sec)
Core 1  EURUSD,M1: 3387955 ticks, 52608 bars generated. Test passed in 0:00:06.162.


Net execution of OnTick itself is 4.2 times slower in Single Run mode than in Optimize mode. And that's on the same local Agent!

Forum on trading, automated trading systems and trading strategies testing

Libraries: TesterBenchmark

fxsaber, 2017.07.24 14:33

Same situation in MT4 as well. Probably the brakes in 4 are due to log formation during Single pass.

 

If you apply an MT5 indicator to a chart that allows you to select colours and then recompile it, the colours are reset to the original and the other settings remain.

Why the colours are reset is extremely inconvenient, especially if the indicator is MTF and the colours are tied to the TF.

 
Work with your code - 99.9% - you have a log full of errors like "no money to open a position".

I sat and waited to see what the slow agent would return. In the end it returned error INIT_PARAMETERS_INCORRECT (no operations performed). Which, in my case, indicates that the input parameters don't fit. So with 99 out of 100 probability I can say that someone just plugged an old laptop into the system. The idea becomes meaningless because of that. Observed in MQL5 Cloud USA


It's in the logs

MQL5 Cloud USA genetic pass (0, 206) tested with error "incorrect input parameters" at 0:00:00.359 (PR 142)

 

Question for developers (I apologize if I am boring you)

I don't understand - my genetic algorithm says 12000 passes, but my agents actually perform only 9000 passes. - What happens to another 3000 results?

 
Before calling something a "glitch" you should study the documentation (Особенности тестирования - Алгоритмический трейдинг, торговые роботы) - read the whole section.
Графические объекты при тестировании

Во время тестирования/оптимизации не осуществляется построение графических объектов. Таким образом, при обращении к свойствам созданного объекта во время тестирования/оптимизации эксперт получит нулевые значения.

Данное ограничение не распространяется на тестирование в визуальном режиме.
So, how can I see if the robot has put the stops well on the chart apart from the visualization? The visualization is slow (
 
fxsaber:

The Expert Advisor is compiled under 1641, which has a fast trading history.

Is it possible during the optimization to get to the Agent of build 1596, where the history is working VERY slowly, and therefore the optimization is slowed down many times?

No, tasks are not distributed to old agents in the cludes.
Reason: