CAppDialog minimize and change value

 

Hello, I have an issue with a panel I created for my Expert Advisor. If I set all the values and then change the timeframe, the panel remains open but the values reset to default. However, if I change the chart (switch from XAU to EURUSD and then back to XAU), I find the chart minimized. 

This is my OnDeInit

void OnDeinit(const int reason)
  {
      Pannel.Destroy(reason);
  }
 

and I create the panel in OnInit.

Can anyone help me?


Thank you.