Errors, bugs, questions - page 2313

 
Vladimir Karputov:

I have this problem on my laptop, when a task continues to count on the agent (for example, I messed up in the code with the opening position and the poor agent sends and sends trade orders, but he gets bans in response, but it continues to bomb, resulting in all agents have long finished calculations, but this poor guy keeps hammering and hammering).

That is, in short: the agent has a task from the last mission, and he continues to fight with it.

I had this opposite today, after agents had been out of action for over 24 hours.

I think there's a glitch with authorisation and data exchange, i.e. if no EA/history is transmitted for a long time, the client side reconnects and the agent is still waiting for files to arrive.
 
fxsaber :

Almost three million ticks and only 16K OrderSend. But these trade orders take one third of the time. And on every tick there are calculations in the Expert Advisor.

Hence my question. Could you run the code of OrderSend in the profiler? In what place is there such a hitch?

I assume that if you replace the standard function with your own, it will work faster. Probably, there are some expensive checks and gestures in OrderSend. For example, if there are no History-functions and OnTrade* in the Expert Advisor (+ indicators), then forming the appropriate records/events is a waste of time.

I understand that for some people one run lasts many minutes. But there are cases like above - units of seconds, if you pay attention to speed of execution. And here it turns out that I launch Optimize for three hours, and of them one hour is OrderSend, which average execution time is 69 µs (see screenshot):

Hi,

Did you get a useful response from Metaquotes?

I have a client who wants to use the MT5 Strategy Tester to improve performance. The EA strategy can easily use the "Available prices only" mode. However, the backtest, which takes 1.5 seconds with MT4, is done in 5 seconds with MT5!

The strategy uses a trailing stop and seems to use OrderSend () for 90% of the backtest time:


 
Alain Verleyen:

Hi,

Did you get a useful response from Metaquotes?

I have a client who wants to use the MT5 Strategy Tester to improve performance. The EA strategy can easily use the "Available prices only" mode. However, the backtest, which takes 1.5 seconds with MT4, is done in 5 seconds with MT5!

The strategy uses a trailing stop and seems to use OrderSend () for 90% of the backtest time:

All answers were given in this thread only. Looks like something has been done.

MetaQuotes Software Corp.:
  1. Tester: Optimized and accelerated strategy tester.

Solved it myself through Virtual.


ZZY Show your EA.

Библиотеки: Virtual
Библиотеки: Virtual
  • 2018.10.03
  • www.mql5.com
Статьи и техническая библиотека по автоматическому трейдингу: Библиотеки: Virtual
 
fxsaber:

Looks like something has been done

1930

Core 1  pass 0 returned result 99753711.00 in 0:00:03.729
Core 1  pass 1 returned result 99753711.00 in 0:00:03.432
Core 1  pass 2 returned result 99753711.00 in 0:00:03.401
Core 1  pass 3 returned result 99753711.00 in 0:00:03.354
Core 1  pass 4 returned result 99753711.00 in 0:00:03.323
Core 1  pass 5 returned result 99753711.00 in 0:00:03.385
Core 1  pass 6 returned result 99753711.00 in 0:00:03.448
Core 1  pass 7 returned result 99753711.00 in 0:00:03.369
Core 1  pass 8 returned result 99753711.00 in 0:00:03.369
Core 1  pass 9 returned result 99753711.00 in 0:00:03.385
Tester  optimization finished, total passes 10
Statistics      optimization done in 0 minutes 35 seconds
Statistics      shortest pass 0:00:03.323, longest pass 0:00:03.729, average pass 0:00:03.419


Virtual

Core 1  pass 0 returned result 99753711.00 in 0:00:02.231
Core 1  pass 1 returned result 99753711.00 in 0:00:01.217
Core 1  pass 2 returned result 99753711.00 in 0:00:01.217
Core 1  pass 3 returned result 99753711.00 in 0:00:01.185
Core 1  pass 4 returned result 99753711.00 in 0:00:01.170
Core 1  pass 5 returned result 99753711.00 in 0:00:01.201
Core 1  pass 6 returned result 99753711.00 in 0:00:01.186
Core 1  pass 7 returned result 99753711.00 in 0:00:01.201
Core 1  pass 8 returned result 99753711.00 in 0:00:01.185
Core 1  pass 9 returned result 99753711.00 in 0:00:01.202
Tester  optimization finished, total passes 10
Statistics      optimization done in 0 minutes 13 seconds
Statistics      shortest pass 0:00:01.170, longest pass 0:00:02.231, average pass 0:00:01.299


The difference is three times what it was with 1881. Probably tweaked somewhere else. But the OrderSend topic was probably not touched.

 
fxsaber :

All the answers have only been given in this thread. Looks like something has been done.

Solved it myself through Virtual.

Thank you for your reply.
 
Guys. There's an error on the site again.
I can't reply to messages on the marketplace from my phone. The list doesn't pop up.
On holiday, no computer.

 

Optimisation generates bundles of 128 jobs for each Agent. Is it possible to form packs of a different size?

This is the situation

All agents except one have completed their tasks. And we have to wait for optimization to complete because of one Agent. But it was possible to achieve almost simultaneous termination of work of all Agents.

Let's consider, for example, as on the screenshot, 8 Agents and 5376 tasks. 5376 / 8 = 672 tasks. So you could form bundles of size 336 (=672/2), 168 (672/4) or 84 (672/8) jobs in each. And then all the Agents would reach the finish line at the same time.


The value of 128, on the other hand, does not take this multiplicity into account. This results in longer Optimization times if multiple cores are used.

 

I wanted to put a grade on the KB and it didn't work. And judging by the fact that recent publications have no ratings at all, it looks like I'm not the only one with this problem.

And at the same time, I want to admit that the rating system(a simple ar ithmeticmean ) makes you want more. After all, a newly published code with one 5-star rating will be higher than a code that has been in BE for several years and has 49 5-star ratings and one 4-star rating. Is this fair ?

In my opinion at least this formula would be much fairer:

double R=Average*pow(N,0.1);

Where:

R- the rating you're looking for

Average- arithmetic mean score

N- number of ratings.

 
fxsaber:

Optimisation generates bundles of 128 jobs for each Agent. Is it possible to form packs of a different size?

This is the situation

All agents except one have completed their tasks. And we have to wait for optimization to complete because of one Agent. But it was possible to achieve almost simultaneous termination of work of all Agents.

Let's consider, for example, as on the screenshot, 8 Agents and 5376 tasks. 5376 / 8 = 672 tasks. So you could form bundles of size 336 (=672/2), 168 (672/4) or 84 (672/8) jobs in each. And then all the Agents would reach the finish line at the same time.


The value of 128, on the other hand, does not take this multiplicity into account. This causes the Optimization time to increase if multiple cores are used.

Overall I support this, but I think it would be more correct to enable automatic cancellation of jobs for agents (already implemented by pressing button to disable agent activity), if there are free agents and 5 times more jobs and redistribute jobs again to all agents, including remote ones.

 

Good afternoon everyone! Sorry for the silly question. Guys, could you please tell me how to make Pressed property of a button to be true when left-clicking and false when left-clicking. Now the situation is such, that nothing happens by pressing it, and by releasing it Pressed changes its value to the opposite.

I understand that I need to override the CButton::OnMouseUp and CButton::OnMouseDown event handlers, but I have no idea where to do that. A hint please. Thanks in advance!

Reason: