MT5 and speed in action - page 76

 
Renat Fatkhullin:

Go study the subject (for at least 10 years) and don't litter in this thread, please.

We are discussing issues here with a different training and a different class.

Dear fellow developers who have given half their lives to studying the topic under discussion.

Please answer a simple user question.

How would a terminal work faster and consume less resources if it has 99 Expert Advisors?

1. On the same symbol

-Using OnTick and getting the current prices via SymbolInfoTick

-using OnBookEvent and getting current prices via MarketBookGet

2. the same, but on different symbols

Thank you!
Документация по MQL5: Константы, перечисления и структуры / Торговые константы / Свойства ордеров
Документация по MQL5: Константы, перечисления и структуры / Торговые константы / Свойства ордеров
  • www.mql5.com
Приказы на проведение торговых операций оформляются ордерами. Каждый ордер имеет множество свойств для чтения, информацию по ним можно получать с помощью функций Идентификатор позиции, который ставится на ордере при его исполнении. Каждый исполненный ордер порождает сделку, которая открывает новую или изменяет уже существующую позицию...
 
Dmi3:

Dear fellow developers who have given half their lives to studying the topic under discussion.

Please answer a simple user question.

How would the terminal work faster and consume less resources if there were 99 Expert Advisors in it?

1. On the same symbol

-Using OnTick and getting the current prices via SymbolInfoTick

-using OnBookEvent and getting current prices via MarketBookGet

2. the same, but on different symbols.

Thank you!

What makes you think it's a simple question?

Dear colleague, if you are a developer, you must check everything yourself. Or you can order a freelance survey with complete and detailed description of all the raw data

 
Dmi3:

How would the terminal work faster and consume less resources if there were 99 EAs in it:

2. the same, but on different symbols

99 tumblers to broadcast is no small amount of flow.

 
fxsaber:

99 glasses to broadcast is no mean stream.

In fact, we have about a dozen live ones on Forts, the rest are illiquid.
 
Dmi3:
In fact, we have about a dozen live ones on Forts, the rest are illiquid.

Run this advisor in various configurations and see the results.

 
fxsaber:

Run this EA in different configurations and see the results.

Let's see the result (Bild 2650, Open, Real)

2020.11.09 20:12:22.910 11_test (Si-12.20,M1)   Alert: OnTick-lag! - 291655 mcs.
2020.11.09 20:12:22.910 11_test (Si-12.20,M1)        [bid]  [ask] [onTick] [Interval]
2020.11.09 20:12:22.910 11_test (Si-12.20,M1)   [0]  76595  76598    false        696
2020.11.09 20:12:22.910 11_test (Si-12.20,M1)   [1]  76596  76598     true     150488
2020.11.09 20:12:22.910 11_test (Si-12.20,M1)   [2]  76596  76598    false        323
2020.11.09 20:12:22.910 11_test (Si-12.20,M1)   [3]  76596  76598     true     291655
2020.11.09 20:12:23.290 11_test (Si-12.20,M1)   Alert: OnTick-lag! - 25571 mcs.
2020.11.09 20:12:23.290 11_test (Si-12.20,M1)        [bid]  [ask] [onTick] [Interval]
2020.11.09 20:12:23.290 11_test (Si-12.20,M1)   [0]  76595  76598    false        663
2020.11.09 20:12:23.290 11_test (Si-12.20,M1)   [1]  76595  76597     true      97445
2020.11.09 20:12:23.290 11_test (Si-12.20,M1)   [2]  76595  76597    false        334
2020.11.09 20:12:23.290 11_test (Si-12.20,M1)   [3]  76595  76597     true      25571
2020.11.09 20:12:23.920 11_test (Si-12.20,M1)   Alert: OnTick-lag! - 209232 mcs.
2020.11.09 20:12:23.920 11_test (Si-12.20,M1)        [bid]  [ask] [onTick] [Interval]
2020.11.09 20:12:23.920 11_test (Si-12.20,M1)   [0]  76593  76596    false        659
2020.11.09 20:12:23.920 11_test (Si-12.20,M1)   [1]  76594  76596     true      33395
2020.11.09 20:12:23.920 11_test (Si-12.20,M1)   [2]  76594  76596    false        343
2020.11.09 20:12:23.920 11_test (Si-12.20,M1)   [3]  76594  76596     true     209232
2020.11.09 20:12:24.572 11_test (Si-12.20,M1)   Alert: OnTick-lag! - 31365 mcs.
2020.11.09 20:12:24.572 11_test (Si-12.20,M1)        [bid]  [ask] [onTick] [Interval]
2020.11.09 20:12:24.572 11_test (Si-12.20,M1)   [0]  76594  76597    false        342
2020.11.09 20:12:24.572 11_test (Si-12.20,M1)   [1]  76594  76596     true      66980
2020.11.09 20:12:24.572 11_test (Si-12.20,M1)   [2]  76594  76596    false        662
2020.11.09 20:12:24.572 11_test (Si-12.20,M1)   [3]  76594  76596     true      31365
2020.11.09 20:12:25.137 11_test (Si-12.20,M1)   Alert: OnTick-lag! - 340874 mcs.
2020.11.09 20:12:25.137 11_test (Si-12.20,M1)        [bid]  [ask] [onTick] [Interval]
2020.11.09 20:12:25.137 11_test (Si-12.20,M1)   [0]  76591  76593     true       6635
2020.11.09 20:12:25.137 11_test (Si-12.20,M1)   [1]  76591  76593     true          5
2020.11.09 20:12:25.137 11_test (Si-12.20,M1)   [2]  76591  76593    false        654
2020.11.09 20:12:25.137 11_test (Si-12.20,M1)   [3]  76591  76593     true     340874
 
prostotrader:

See the result (Bild 2650, Open, Real)

This is an incorrect comparison (the printout shows it), as the code should be different if flippers are present.

 
fxsaber:

This is an incorrect comparison (you can see it on the printout), as the code should be different if fins are present.

This is your program (didn't change anything) :)

Added

// Возвращает bid/ask-цены из стакана.
bool GetCurrentPrices( double &bid, double &ask )
{
  MqlBookInfo Bands[];

  const bool Res = MarketBookGet(_Symbol, Bands);

  if (Res)
    for (int i = ArraySize(Bands) - 2; i >= 0; i--)
      if (Bands[i].type == BOOK_TYPE_SELL)
      {
        ask = Bands[i].price;
        bid = Bands[i + 1].price;
        
        break;
      }
  
  return(Res);
}

Incorrect function, because

1. the glass can be empty

2. There is no Sell quotation in the cup

3. the cup does not contain Buy quotes

 
prostotrader:

An incorrect function because

Why are you making a nuisance of yourself? There's no error handling or anything. The purpose of this code is not to be in the EA, but to show that there is a problem.

prostotrader:

It's your program (I haven't changed anything) :).

Therefore, I know the logic of this program so much that I can assert the incorrectness of its results on FORTS.

 
fxsaber:

Why are you making a nuisance of yourself? There's no error handling or anything in there yet. The purpose of this code is not to be in a fighting Expert Advisor, but to show the presence of the problem.

That's why I know the logic of this program so much that I can say that its results are incorrect on FORTS.

OK