Expert profiling conundrum - how not to exceed the 15 minute limit of the Championship - page 2

 

marketeer:

This is how the inidactor becomes a bottleneck - I'd like to hear more about this. I have one indicator in use, but reading data from it is included in the 1.5 minute timings I have measured.


All that matters is:

1. How the indicator reads data and how many buffers it has (how "heavy" the logic is);

2. What depth of calculation is used and needed;

3. frequency of refreshing of the indices (some indices can be refreshed on every tick, some on a timer, and some even on an event).

 
DC2008:

1. the indicator should be included directly in the Expert Advisor code and only the last bars should be used in the calculation. The performance of indicators on the example of MA is studied here.

2. You should not perform unnecessary calculations on every tick. You do not place or close orders on every tick, do you?

The indicator is made according to the "standard" - only the last bars that haven't been calculated during the previous call of OnCalculate are calculated. It's a pain in the ass, I don't understand why the standard manufacturer's recommended approach cannot be used to achieve effective work.

2. Expert Advisor is Binary. Synchronization for symbols at the beginning of each bar is performed on several ticks and takes seconds (in a general run, not on each bar).

 
TheXpert:
And the calculation is not. Take him out too. He's not in the councillor's office.

Got it. I am testing it on two weeks for speed. The results are as follows: total time taken - 1 minute and 6 seconds, Expert Advisor operation - 13 seconds, indicator calculation - 17 seconds. Total - 30 seconds in my code, less than half. That's how it is ;-////

Документация по MQL5: Основы языка / Функции / Функции обработки событий
Документация по MQL5: Основы языка / Функции / Функции обработки событий
  • www.mql5.com
Основы языка / Функции / Функции обработки событий - Документация по MQL5
 
DC2008:

1. the indicator should be included directly in the EA code and only the last bars should be used in the calculation. The performance of indicators on the example of MA is studied here.

2. You should not perform unnecessary calculations on every tick. You do not place or close orders on every tick, do you?

Yes, I do! It took me thirty minutes to test the Expert Advisor on calls of custom indicators. After the indicator code was packed into the Expert Advisor, the test was over in 12 minutes.
 
GODZILLA:
Yes! Definitely! It took me thirty minutes to test the Expert Advisor on calls of custom indicators, but after compressing the indicator code into the Expert Advisor the test was over in 12 minutes.
DC2008:

Learn to write indicators at last.

 
TheXpert:

Learn to write indicators at last.

Who's that for?
 
TheXpert:
Both.
In fact, it is a fact that the turkey call has overheads, and these can be eliminated by moving the calculation to the Expert Advisor. But this is a perversion.
 
TheXpert:
Both of them.
That makes sense then, I've heard it before! When you talk about concrete facts, you can listen to a person, but "smart advice" about nothing, covered with a layer of mould, from a venerable "brand" is beyond common sense logic.
 
TheXpert:

Learn to write indicators at last.

Teach the MQ programmers how to write indicators. The speed of this or that approach is proven in the article, if you are too lazy to read it, it drops by a factor of 20.
 
GODZILLA:
That makes sense then, I've heard it before! When you talk about concrete facts, you can listen to a person, but "smart advice" about nothing, covered with a layer of mould, from a venerable "brand" - this is already beyond the limits of common sense logic.
Dear Sir, this thread already has a beard to the floor. Look on the forum occasionally, and on that forum and on this one it has already been discussed with concrete facts and confirmations. The opinion of the developers of the terminal on this subject has been stated on this forum as well. Trying to calculate indicators in the Expert Advisor is a dead-end and doomed approach.
Документация по MQL5: Основы языка / Функции / Функции обработки событий
Документация по MQL5: Основы языка / Функции / Функции обработки событий
  • www.mql5.com
Основы языка / Функции / Функции обработки событий - Документация по MQL5
Reason: