Discussion of article "Create Your Own Graphical Panels in MQL5" - page 4

 

The indicator has this property:

#property indicator_separate_window

This property is needed for the indicator to be at the bottom. Well, yes, it's kind of clear.

I need to have a "dialogue bar" in the main window as well....

And that's it. Because of this property, no matter what you do, no matter what properties you define, your dialogue bar will be in the subwindow of the indicator. And it will never be in the main window.

I spent three days trying to understand the standard library. I still don't understand how it was possible to create such an omission?

If I'm wrong, poke me where I'm doing it wrong. Just for God's sake don't write that you need to specify 0 for window and subwindow properties.

In the meantime, I'll create my own panel that will work as it should.

 
Evgeniy Scherbina standard library. I still don't understand how it was possible to create such an omission?

If I'm wrong, poke me where I'm doing it wrong. Just for God's sake don't write that you need to specify 0 for window and subwindow properties.

In the meantime, I'll create my own panel that will work as it should.

scour the code, add the m_subwin option defining the subwindow number, intercept subwindow "create/delete" events to correct this case in the whole dialogue if it is not 0, use this m_subwin where ObjectCreate(...) is used

then panels and elements can be created in any window and subwindow

 
Maxim Kuznetsov #:

scour the code, add m_subwin option defining subwindow number, intercept subwindow "creation/deletion" events to correct this case in the whole dialogue if it is not 0, use this m_subwin where ObjectCreate(...) is used.

then panels and elements can be created in any window and subwindow

Yes, yes, this is all to add, attach, wrap with aluminium wire and tape. We need a simple and correct solution for all this library. If there is no such solution, then the library must be redesigned. I'll probably make my dialogue box myself.
 
Evgeniy Scherbina #:
Yeah yeah, add all this stuff, attach it, wrap it in aluminium wire and tape it up. We need a simple and correct solution for this whole library. If there is no such solution, then the library must be redesigned. I will probably make my own dialogue window.

This is a limitation of the MetaTrader platform - one indicator can be only in the main window or only in a subwindow.

Possible solutions and an example of one implementation are in the book.

In brief - you make 2 indicators, and one will create the other using ChartIndicatorAdd. They can exchange data via events, resources, buffers, etc.

Учебник по MQL5: Создание прикладных программ / Использование готовых индикаторов из MQL-программ / Комбинирование вывода в главное окно и вспомогательное
Учебник по MQL5: Создание прикладных программ / Использование готовых индикаторов из MQL-программ / Комбинирование вывода в главное окно и вспомогательное
  • www.mql5.com
Создание прикладных программ - Программирование на MQL5 для трейдеров - Учебник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Stanislav Korotky #:

This is a limitation of the MetaTrader platform - one indicator can be only in the main window or only in a sub-window.

Possible solutions and an example of one implementation are in the book.

In brief - you make 2 indicators, and one will create the other using ChartIndicatorAdd. They can exchange data via events, resources, buffers, etc.

If these are the words of a specialist, then this is exactly what I wanted to hear. And it means that you need to create your own panel.

If that's just a guess... then you have to build your own panel.

I'm waiting for a hint on how to just stick the panel in the main window, if the indicator is located in the subwindow.