Download MetaTrader 5
To add comments, please log in or register
Use the Pocket to paste your content. It is convenient!
ivan
505
ivan 2014.04.13 08:23 

Hi everybody,

I am trying to incorporate interactive buttons from the mql4 help examples into my code, and a strange conflict arises when my code uses input variables, breaking initialization of the buttons panel. In order to show the conflict I am enclosing an illustrative example below.

An object called SimplePanel is situated in \MQL4\Indicators\Examples\SimplePanel\SimplePanel.mq4, it creates a panel with buttons, and the panel initializes just fine.

But if one adds a single row in the heading of SimplePanel.mq4, input bool abcd=true;

one now has the input variables tab with the option to choose abcd.

If one does not click at the tab, the panel again launches fine as before. The conflict arises if one clicks on the tab to set abcd as then the SimplePanel does not initialize and the indicator de-inits right away.

The same problem takes place in creating other panels, here SimplePanel is taken just to have a bug-free original.

Illustration:

this way it works:

No conflict

but if you click at "input parameters" tab, it does not work:

Conflict

I attach the indicator file, it is identical to the original \MQL4\Indicators\Examples\SimplePanel\SimplePanel.mq4 except the above mentioned row with #input.

Build 625.

Maybe somebody can comment on the possible cause of the conflict and suggest a way out.

Thanks.

Alain Verleyen
Moderator
28522
Alain Verleyen 2014.04.14 07:57  
qomment:

Hi everybody,

I am trying to incorporate interactive buttons from the mql4 help examples into my code, and a strange conflict arises when my code uses input variables, breaking initialization of the buttons panel. In order to show the conflict I am enclosing an illustrative example below.

An object called SimplePanel is situated in \MQL4\Indicators\Examples\SimplePanel\SimplePanel.mq4, it creates a panel with buttons, and the panel initializes just fine.

But if one adds a single row in the heading of SimplePanel.mq4, input bool abcd=true;

one now has the input variables tab with the option to choose abcd.

If one does not click at the tab, the panel again launches fine as before. The conflict arises if one clicks on the tab to set abcd as then the SimplePanel does not initialize and the indicator de-inits right away.

The same problem takes place in creating other panels, here SimplePanel is taken just to have a bug-free original.

...
I confirm this behaviour. You can report it to the Service Desk of Metaquotes.
ivan
505
ivan 2014.04.14 09:47  
angevoyageur:
I confirm this behaviour. You can report it to the Service Desk of Metaquotes.


Thank you for the confirmation. Reported to the Service Desk.
/
To add comments, please log in or register