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.
this way it works:
but if you click at "input parameters" tab, it does not work:
I attach the indicator file, it is identical to the original \MQL4\Indicators\Examples\SimplePanel\SimplePanel.mq4 except the above mentioned row with #input.
Maybe somebody can comment on the possible cause of the conflict and suggest a way out.
To add comments, please log in or register