Новая версия платформы MetaTrader 5 build 2755: Улучшения в окне котировок и отладчике - страница 27

 
Edgar Akhmadeev:

Какие доказательства? Логи? Скриншот - это результат честного и долгого профилирования большого советника (690 Кб - это не размер кода, а размер ex5; хотя и код примерно такого же объёма).

Да, результат - эта одна строка. Она не раскрывается (а должна?) ни кликом, ни из контекстного меню ("Развернуть всё"). И переключение режима просмотра ничего не меняет. И эта функция (одна из сотен) очень быстро выполняется при инициализации эксперта, который сам занимает почти 3 минуты профилирования. И показанные на ней 19% очень странны.

Этот результат стабильно повторился раз 10, на разных билдах (последних). В начале моих попыток там была одна, но другая функция. Которая НИ РАЗУ НЕ ВЫЗЫВАЛАСЬ. Я закомментировал её тело и вызов, и теперь так.

Если так только у меня - я не могу дать код, да и смысла нет. В другом окружении всё будет по-другому. Я вижу, что баги с новым отладчикам нестабильны и трудноуловимы, возможно зависят от окружения.

Все равно не верится, так как у нас в тестах более-менее видно.

Но мы уже нашли проблемы учета границ кода из-за экстремальной оптимизации. Это приводило к выпадению видимости функций.

Сегодня решили расслабить несколько типов оптимизаций в режиме профилирования, чтобы сохранить структуру кода.

В ближайшие дни в очередных бетах будет доступно.

 
Renat Fatkhullin:

Все равно не верится, так как у нас в тестах более-менее видно.

Сам в шоке

 

в профилировщике на реалтайме сильно меняется картина от исторических данных,

на истории OnChartEvent с CopyBuffer лидирует по нагрузке, в реалтайме OnTick и CTrade с OrderSend операции (в истории CTrade вообще по 0 примерно)

профилирование в реалтайме 1,5 часа шел

 

В ME всплывающая подсказка обрезается.

Использовал пример из Документации.

 
fxsaber:

В ME всплывающая подсказка обрезается.

Использовал пример из Документации.

Может монитор пошире купить?))))

 

Использую разные терминалы для анализа мирового рынка в различных секторах (Fx, Indexes, Metals etc). Сегодня уперся в странное ограничение - не могу запустить больше 16 терминалов. При этом проц загружен менее 10%, свобоной опер. памяти полно.

Новые терминалы просто не запускаются, ни МТ4, ни МТ5. Если закрыть любой из открытых 16ти, то можно запустить только один терминал из числа тех, которые не запускалис до этого.

Это действительно некое внутреннее ограничение платформы?  Можно ли данный лимит как-то увеличить, поднять до 32х терминалов, н-р настройками реестра или ini-файлов?

Выглядит все это след. образом: https://yadi.sk/i/63N0eU5T-sfJYw

capture-1.avi
capture-1.avi
  • yadi.sk
View and download from Yandex.Disk
 
Renat Fatkhullin:

Вы забыли самое главное - доказательства с отчетами этих самых 690 кб кода.

Пока у вас только слова. Или вы утверждаете, что результат полноценного профилирования ваших 690 кб, это вот эта строка? Которая даже не раскрыта.


По поводу компиляции. Сейчас не знаю как, но ранее не выкидывались из релиза неиспользуемые данные в виде объявленных массивов.
 
Renat Fatkhullin:

MT5 снова испытывает проблемы с автоматическим пересканированием сети при длительных больших пингах.

Подробности скинул в ЛС.

 

CopyBuffer () should NOT work with indicator buffers which are INDICATOR_CALCULATIONS.

https://www.mql5.com/en/docs/customind/indicators_examples

I quote the following for the MQL source:

The difference between an indicator buffer and an array

In each indicator, on its global level , you should declare one or more arrays of the double type, which then must be used as an indicator buffer using the SetIndexBuffer () function. To draw indicator plots, only the values ​​of the indicator buffers are used, any other arrays cannot be used for this purpose. In addition, buffer values ​​are displayed in the Data Window.      

An indicator buffer should be dynamic and does not require specification of the size - the size of the array used as the indicator buffer is set by the terminal execution subsystem automatically.        

After the array is bound to the indicator buffer, the indexing direction is set by default like in ordinary arrays, but you can use the ArraySetAsSeries () function to change the way of access to the array elements. By default, the indicator buffer is used to store data used for plotting ( INDICATOR_DATA ).        

If the calculation of indicator values ​​requires holding intermediate calculations and storing the additional values ​​for each bar, then such an array can be declared as a calculation buffer during binding ( INDICATOR_CALCULATIONS ). For the intermediate values, you can also use a regular array, but in this case, the programmer has to manage the size of the array.

Some plots allow setting a color for each bar. To store the information about color, color buffers are used ( INDICATOR_COLOR_INDEX ). The color is an integer type  color , but all indicator buffers must be of type  double . Values ​​of color and auxiliary (INDICATOR_CALCULATIONS) buffers cannot be obtained by using  CopyBuffer () .

Being able to copy the INDICATOR_CALCULATIONS buffers is causes me big problems for my projects. According to the documentation this shouldn't be possible. Is there anyway we can get this resolved as I have found the documentation specifically mentioning the issue I shouldn't be having?

If this issue is unable to be resolved then is it possible to add a way to read the indicator buffer type (INDICATOR_DATA, INDICATOR_CALCULATIONS, INDICATOR_COLOR_INDEX) instead, so I can programatically know what buffers to ignore?

Sorry for not posting in the English section, I feel this is a big bug that needs to be noticed.

Thanks



Proof in points (I hope this helps): Why should CopyBuffer () not work on buffers set to INDICATOR_CALCULATIONS

1. The documentation says it shouldn't work.  https://www.mql5.com/en/docs/customind/indicators_examples

2. Other people in the past could not copybuffer on INDICATOR_CALCULATIONS buffers  https://www.mql5.com/en/forum/1990  

3. There is no logical reason to include ever use this code:

PlotIndexSetInteger(0,PLOT_SHOW_DATA,false); 

If the below code does exactly the same (which it shouldn't).

SetIndexBuffer(0,Buffer_Name,INDICATOR_CALCULATIONS); 

The former should hide the plot in the data window only. The latter should hide from copybuffer () and data window.

4. A metaquotes built-in indicator doesn't allow copybuffer () on INDICATOR_CALCULATIONS but on a custom indicator you can. For example, compare built-in indicator iBands (Bollinger bands) with "Examples \ bb.ex5" to see they behave different with the INDICATOR_CALCULATIONS buffer.

Documentation on MQL5: Custom Indicators / Indicator Styles in Examples
Documentation on MQL5: Custom Indicators / Indicator Styles in Examples
  • www.mql5.com
Indicator Styles in Examples - Custom Indicators - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Edgar Akhmadeev:

Польза от старого профилировщика была в пост-анализе времени выполнения каждого оператора и каждой функции, для поиска узких мест. И пусть он безбожно врал, но позволял найти эти места.

Противоречие в двух соседних предложениях.

Что же он помогает найти, если в реальности эти "узкие места" вообще не занимают процессорного времени?

Нужно просто допилить новый профилировщик, сейчас он действительно работает очень нестабильно.

Причина обращения: