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

 

Who knows how to use SB to create OOP EAs, please create an EA as a portfolio of 20 identical TS. And share the results of performance of such a portfolio of TS in the Tester.


As an example, for me a single TS (on pending orders) takes a second to pass. A portfolio of 20 such trades takes > 30 minutes. I.e. slowdown is not 20 times, but 2000 times - two orders of magnitude more than it should be.

It turns out that the tester is not suitable for portfolio trading.

 
fxsaber:

To give you an example, it takes me a second to pass one trade (on a pending order). A portfolio of 20 such TSs > 30 minutes. I.e. the slowdown is not 20 times, but 2000 times - two orders of magnitude more than it should be.

It turns out that Tester is not suitable for portfolio trading.

Each TS on each tick runs in cycles through all orders looking for its own?

 
Andrey Khatimlianskii:

Every TC on every tick runs a loop through all orders looking for its own?

Yes. But that's not what's causing the slowdown. For example, if we run in Optimizer, the speed increases by 10 times exactly.

 
fxsaber:

Yes. But that's not what's causing the slowdown. For example, if you run it in the Optimiser, the speed increases by a factor of 10 exactly.

Then what slows down? The tester's internal parts (checking of order triggering, margin, etc.)?

I made a single list of orders and access to it from all the TCs, it noticeably accelerated the work.

 
Andrey Khatimlianskii:

What's slowing things down then? Tester internals (checking for order triggering, margin, etc.)?

The optimizer differs from the single one in that there is no log for every fart. Most likely, logging creates most of the lags.

This would speed up the work considerably.

In Terminal one EA from the basket of 20 EAs works perfectly.

 
fxsaber:

Who knows how to use SB to create OOP EAs, please create an EA as a portfolio of 20 identical TS. And share the results of performance of such a portfolio of TS in the Tester.


As an example, for me a single TS (on pending orders) takes a second to pass. A portfolio of 20 such trades takes > 30 minutes. I.e. slowdown is not 20 times, but 2000 times - two orders of magnitude more than it should be.

It turns out that the tester is not suitable for portfolio trading.

I can't check it yet, computers are busy, but the time of testing the TS portfolio is definitely increasing

I have a "slicing" of TCs by time of EA operation, time of EA operation rarely overlap - and the task is to evaluate a portfolio already optimized in the tester TCs, if the portfolio plummet - the test is terminated, in general it is possible to work in the tester



there is a suspicion that pending orders increase testing time, and for sure - calculation of margin is a very "expensive" operation, my profiler puts most of the time on OrderCalcMargin() call - it is highly probable that the same check takes place in the tester for pending orders


you need to test with a test EA to find the truth

 
Igor Makanu:

there is a suspicion that pending orders increase testing time and for sure - margin calculation is a very "expensive" operation, my profiler puts the most time into callingOrderCalcMargin()- it is highly probable that a similar check is performed by the tester for pending orders

I don't use this function anywhere. And I race in pips mode, where the tester itself ignores margin calculation.

 

what could it be, where to dig?

test on all symbols in market overview:

all agents have finished and the timer keeps going...

the strangest thing is that before the test started, there were 31 in the overview, as well as the stopping point. but another 8 opened on their own, rather strange ones, I've never opened a trade on them, from exotics.

 
Igor Zakharov:

The strangest thing is that before the test started, there were 31 in the review, as well as the breakpoint. but another 8 opened on their own, quite strange, I have never opened deals on them, from exotics.

After restarting the computer, the number of openings is 42. they appear after pressing "start". the test reaches the end. the same trades are added (at first glance, i have not checked them all). the log is the same as usual - connected, synchronized...

 
Igor Zakharov:

After restarting the computer they become 42. they appear after pressing "start". the test reaches the end. the same ones are added (at first glance, i have not checked them all). in the log everything is as usual - connected, synchronized...

Are they used for recalculation in profit or margin into deposit currency (the tester adds them automatically at position opening)?

Reason: