how to open the EA Input dialog pragrammatically?

 

hello everyone,

is there a simple way in MT5 to open up the input dialog window while running EA through program event or function, like for example clicking on an object?

Reason is, I want to modify the parameters by simply clicking a button created by my EA.

I know you can just double-click on the EA name, but the panels I have created are in such a position that the title name is displaced out of the visible chart area (on purpose), so it is not a viable method anymore (don't ask me to resize panel please, as this is avoiding the solution I am looking for).

And of course the alternative way of right-clicking on the chart and go on Expert list->Properties is too unpractical for a fast everday use. Contrary to the Indicator's list there is not even a built-in keyboard shortcut to recall such a dialog, so that it would require more mouse click steps anyway.


There must be a way from within the mql5 language, as professional tools out there (whose code is not freely accessible though) have a dedicated icon that calls up again the input dialog.

I have searched the mql5 website forums and searched thoroughly on google whitout success.

Any help appreciated.

 
daruler:

hello everyone,

is there a simple way in MT5 to open up the input dialog window while running EA through program event or function, like for example clicking on an object?

Reason is, I want to modify the parameters by simply clicking a button created by my EA.

I know you can just double-click on the EA name, but the panels I have created are in such a position that the title name is displaced out of the visible chart area (on purpose), so it is not a viable method anymore (don't ask me to resize panel please, as this is avoiding the solution I am looking for).

And of course the alternative way of right-clicking on the chart and go on Expert list->Properties is too unpractical for a fast everday use. Contrary to the Indicator's list there is not even a built-in keyboard shortcut to recall such a dialog, so that it would require more mouse click steps anyway.


There must be a way from within the mql5 language, as professional tools out there (whose code is not freely accessible though) have a dedicated icon that calls up again the input dialog.

I have searched the mql5 website forums and searched thoroughly on google whitout success.

Any help appreciated.

It would takes an event manager and a panel dialog that pops-up on a click to manage the input list.

 
Carlos Albert Barbero Marcos #:

It would takes an event manager and a panel dialog that pops-up on a click to manage the input list.

if you have a concrete piece of code in mind, can you please suggest how?


Events are predefined in MQL language, I know how to do several implementaion linked to mouse click or keyboard keypress for example, this is not the problem but I can't see how the input dialog is called from inside an EA.

Also, I found several "workaround" which suggest to implement your own panel to manage inputs, however that is not a real solution for me because that actually moves the problem somewhere else.


What I need is really to change the inputs, not to create an additional layer of interface variables between the inputs visible to the user at start (which AFAIK cannot be changed other than in the EA input dialog) and the actual program parameters.

Also, I do not want to restart the EA, as the operations would be interrupted in the middle of calculations with all side effects imaginable...

 
daruler #:

if you have a concrete piece of code in mind, can you please suggest how?


Events are predefined in MQL language, I know how to do several implementaion linked to mouse click or keyboard keypress for example, this is not the problem but I can't see how the input dialog is called from inside an EA.

Also, I found several "workaround" which suggest to implement your own panel to manage inputs, however that is not a real solution for me because that actually moves the problem somewhere else.


What I need is really to change the inputs, not to create an additional layer of interface variables between the inputs visible to the user at start (which AFAIK cannot be changed other than in the EA input dialog) and the actual program parameters.

Also, I do not want to restart the EA, as the operations would be interrupted in the middle of calculations with all side effects imaginable...

What you are looking fo is not possiblie in Metatrader.

 
Carlos Albert Barbero Marcos #:

What you are looking fo is not possiblie in Metatrader.

I believe I didn't explain clearly:

I know that it is not possible to change the inputs directly through code, however I would need to open up the input dialog again from a chart event (like mouse click on a user-created button)

so that the user CAN modify again their values manually, same dialog window as when you open up the EA start dialog to change them on the fly (by double clicking on the name or as said above, by right-clicking on the chart and then selecting the EA properties).

For sure there must be a way, perhaps using a dedicated DLL or external Win32 API function call, any expert here in that direction who can advise?

 
daruler #:

I believe I didn't explain clearly:

I know that it is not possible to change the inputs directly through code, however I would need to open up the input dialog again from a chart event (like mouse click on a user-created button)

so that the user CAN modify again their values manually, same dialog window as when you open up the EA start dialog to change them on the fly (by double clicking on the name or as said above, by right-clicking on the chart and then selecting the EA properties).

For sure there must be a way, perhaps using a dedicated DLL or external Win32 API function call, any expert here in that direction who can advise?

The way is to search on the forum before asking. It has already been discussed AND solved.
 
Alain Verleyen #:
The way is to search on the forum before asking. It has already been discussed AND solved.

The solution  is for Indicators only it  won't work for EA . 

 
Carlos Albert Barbero Marcos #:

The solution  is for Indicators only it  won't work for EA . 

Really, would you bet on that ?
 
That an arrow indicator buffer on a EA would pop-up the EA input dialog on Click is too small a point to bet on I would say. 
Averaging Price Series for Intermediate Calculations Without Using Additional Buffers
Averaging Price Series for Intermediate Calculations Without Using Additional Buffers
  • www.mql5.com
This article is about traditional and unusual algorithms of averaging packed in simplest and single-type classes. They are intended for universal usage in almost all developments of indicators. I hope that the suggested classes will be a good alternative to 'bulky' calls of custom and technical indicators.
 
Alain Verleyen #:
The way is to search on the forum before asking. It has already been discussed AND solved.

don't worry, I did my due diligence before bothering the guardians of knowledge here.

If you refer to https://www.mql5.com/en/forum/229881, I don't think this is a solution for my case.


Thanks anyway

Is there a way to open inputs dialog box by using OnChartEvent() ?
Is there a way to open inputs dialog box by using OnChartEvent() ?
  • 2018.03.04
  • www.mql5.com
In a custom indicator, I'd like to add an object/button/whatever to the chart that allows the user to click it (or even just hit a hot key) to open...
 

ok, an update possibly useful for the ones reading this in search of similar support:

I found the "solution", or I should rather say the trick, is actually easier than expected, without the need to code any extra feature within the EA:

when you place an object overlapping over the EA name,

the EA icon is actually hidden but not disappearing from a mouse point of view.

You can still double click on the TOP-RIGHT chart window corner (in fact, just a few pixels away from that corner) and the EA parameters will pop-up as usual (unless of course the object itself is coded so that has Z-order priority or it is selectable, btw I did not try that to confirm).

Not the program implementation I was looking for, but this serves the purpose I need

Reason: