Discussion of article "Adding a control panel to an indicator or an Expert Advisor in no time" - page 4

 
Vladimir Karputov:

Do it correctly - processing of the forbidden flag immediately upon entering the function.

Although... Just a moment...

Added:

No. You just need to process the press depending on the forbidden flag.

I see your point, thank you
 
MetaQuotes Software Corp.:

New article Adding a control panel to an indicator or an Expert Advisor in no time has been published:

Aut

MetaQuotes Software Corp.:

New article Adding a control panel to an indicator or an Expert Advisor in no time has been published:

Author: Karputov Vladimir

MetaQuotes Software Corp.:

New article Adding a control panel to an indicator or an Expert Advisor in no time has been published:

Author: Karputov Vladimir

hor: Karputov Vladimir 

 

Hello!

Very nice job! :)

I convert the MACD_exemple in MQ4, to use the grapch function.

works very nice, but when a change the TF more than 2 times, the window was totally desconfigured.

Please, can you help me? 

Look the image, please! 

Files:
 
Vitor Hervatin:
My article is about MetaTrader 5. Although I, too, breaks up the panel (build 1502).
 
Vladimir Karputov:
My article is about MetaTrader 5. Although I, too, breaks up the panel (build 1502).
I know this, but maybe you can help me!
 
Vitor Hervatin:
I know this, but maybe you can help me!
I won't be able to help you - I don't support the old terminal long ago.
 
Vladimir Karputov:
I won't be able to help you - I don't support the old terminal long ago.
Ok ok, no problem! Thanks a lot
 
Vladimir Karputov:
  1. In the nearest update the standard library will be restored - accordingly the Defines.mqh file will be restored.
  2. It is not good to edit the standard library.
In theory - you can Defines.mqh - just inside the project, i.e. do not access the file

#include <Controls\Label.mqh>
#include <Controls\Panel.mqh>
#include <Controls\Edit.mqh>
// #include <Controls\Defines.mqh>
#include <Controls\Button.mqh>
But the method below is more beautiful.



Forum on trading, automated trading systems and testing trading strategies

Why does the panel move away when updating Expert Advisor settings?

Andrey Khatimlianskii, 2016.03.10 13:17

Approximately like this:

// BEFORE connecting Dialog.mqh!
#include <Controls\Defines.mqh>

//--- Forget the old colours
#undef   CONTROLS_DIALOG_COLOR_BORDER_LIGHT
#undef   CONTROLS_DIALOG_COLOR_BORDER_DARK
#undef   CONTROLS_DIALOG_COLOR_BG
#undef   CONTROLS_DIALOG_COLOR_CAPTION_TEXT
#undef   CONTROLS_DIALOG_COLOR_CLIENT_BG
#undef   CONTROLS_DIALOG_COLOR_CLIENT_BORDER

//--- Set new colours
#define  CONTROLS_DIALOG_COLOR_BORDER_LIGHT  clrWhite            // Dialog border colour (outside)
#define  CONTROLS_DIALOG_COLOR_BORDER_DARK   C'0xB6,0xB6,0xB6'   // Dialog border colour (inside)
#define  CONTROLS_DIALOG_COLOR_BG            clrLightGreen       // Dialog background (under the caption and around the client area)
#define  CONTROLS_DIALOG_COLOR_CAPTION_TEXT  C'0x28,0x29,0x3B'   // Dialog caption text colour
#define  CONTROLS_DIALOG_COLOR_CLIENT_BG     clrAliceBlue        // Client area background colour
#define  CONTROLS_DIALOG_COLOR_CLIENT_BORDER C'0xC8,0xC8,0xC8'   // Client area colour

// Now connect
#include <Controls\Dialog.mqh>
 

"prev_timestatictoday variable declared in OnCalculate() function"

Typo, it's not a today variable it's a static variable.

 
I have buttons on the panel spontaneously pressed when I just move the mouse over them without clicking, it's weird.