Algorithms, solution methods, comparison of their performance - page 21

 

If the profiler is to be believed, OrderSend (five-way) takes 88% of my time on the same TC.

If I transfer it to a virtual machine, it only takes 2%.

Why there is such a difference, I don't understand.

 
fxsaber:

If the profiler is to be believed, OrderSend (five-way) takes 88% of my time on the same TC.

If I transfer it to a virtual machine, it only takes 2%.

Why such a difference, I do not understand.

I can only guess.

OrderSend sends a message to the MQL site, while the virtual machine doesn't touchOrderSend and therefore works faster)))

In the latest builds, the terminal itself is overloaded during optimization and testing, except for tester agents.

There is no such a thing in previous builds!

 
Sergey Chalyshev:

I can only speculate.

OrderSend - sends a message to the MQL site, and the virtual does not touch OrderSend and therefore works faster ))))

In the latest builds, when optimizing and testing, except for tester agents, the terminal itself is overloaded.

There is no such a task in previous builds!

I have run the profiler on historical data. Therefore, sending somewhere is excluded.

 
In the new builds, do you load the terminal itself during testing and optimisation? In the task manager, how much is it eating up?
 
fxsaber:

If the profiler is to be believed, OrderSend (five-way) takes 88% of my time on the same TC.

If I transfer it to a virtual machine, it only takes 2%.

Why there is such a difference, I don't understand.

88% of what? If from 2%, then it's fine.

 
fxsaber:

If the profiler is to be believed, OrderSend (five-way) takes 88% of my time on the same TC.

If I transfer it to a virtual machine, it only takes 2%.

Why there is such a difference, I don't understand.

Checking the margin and other trading conditions.

If you upgrade the Virtual to MT5 tester, it will be almost the same.

 
Well, yes, well, yes.
 
Andrey Khatimlianskii:

Checking margins and other trading conditions.

If you upgrade Virtual to MT5 tester status, it's pretty much the same.

Pips mode. Most likely, the profiler is lying.

 
Andrey Khatimlianskii:

If you upgrade Virtual to an MT5 tester, it's almost the same.

According to the figures the difference is more than two orders of magnitude

 
Andrei Trukhanovich:

If the figures are to be believed, the difference is more than two orders of magnitude.

Cited figures from my big EA, which I race in the Optimiser. But it seems to have started to understand where the brakes are. Here is a simple Expert Advisor.

#include <MT4Orders.mqh>

//#define VIRTUAL_TESTER // Запуск в виртуальном торговом окружении
//#include <fxsaber\Virtual\Virtual.mqh>

#define  Ask SymbolInfoDouble(_Symbol, SYMBOL_ASK)

input int Offset = 10000;
input int inFakeRange = 0;

void OnTick()
{
  static bool FirstRun = true;
  static int Sign = 1;
  
  if (FirstRun)
    FirstRun = (OrderSend(_Symbol, OP_BUYLIMIT, 1, Ask - Offset * _Point, 0, 0, 0) == -1);
  else if (OrderSelect(0, SELECT_BY_POS))  
  {
    OrderModify(OrderTicket(), OrderOpenPrice() + Sign * _Point, 0, 0, 0);
    
    Sign = -Sign;
  }    
}

It is almost impossible to wait for its profiling on ticks - it takes too long. Therefore, I have launched it in the Optimizer mode.

optimization finished, total passes 11
optimization done in 0 minutes 55 seconds
shortest pass 0:00:04.300, longest pass 0:00:06.442, average pass 0:00:05.058


If I uncomment the highlighted two lines and set input parameter Virtual = true, it becomes so.

optimization finished, total passes 11
optimization done in 0 minutes 07 seconds
shortest pass 0:00:00.355, longest pass 0:00:01.208, average pass 0:00:00.590


The difference is an order of magnitude. The profiler shows an even larger difference. I do everything only by pips and by real ticks.