Hide subwindow

 
Hi there,
Me again to ask your help.

I found this indicator in mql5 website :
https://www.mql5.com/en/code/13586

And, i want to add a hotkey to hide subwindows.
But i failed ...

case KEY_HIDESUB:
           {
            bool isFixed=ChartGetInteger(0,CHART_WINDOW_IS_VISIBLE,true);
            if(!isFixed)
              {
               ChartSetInteger(0,CHART_WINDOW_IS_VISIBLE,false);
              }
            else  
              {
               ChartSetInteger(0,CHART_WINDOW_IS_VISIBLE,false);
              }
           }
         break;
What i have to do and As SIMPLE as possible please ?

Regards.
Change Timeframes with Hotkeys
Change Timeframes with Hotkeys
  • votes: 16
  • 2015.08.04
  • Mohit Marwaha
  • www.mql5.com
This simple indicator will change the timeframes of the current chart with keypress. I have added yet another functionality to it to fix/unfix chart scale as well as show/hide price scale. 1 = 1 minute 2 = 5 minutes 3 = 15 minutes 4 = 30 minutes 5 = 60 minutes (1 hour) 6 = 240 minutes...
 
Thierry Ramaniraka:
Hi there,
Me again to ask your help.

I found this indicator in mql5 website :
https://www.mql5.com/en/code/13586

And, i want to add a hotkey to hide subwindows.
But i failed ...

What i have to do and As SIMPLE as possible please ?

Regards.


CHART_WINDOW_IS_VISIBLE is ReadOnly. You can't use ChartSetInteger() with CHART_WINDOW_IS_VISIBLE .
 
Thierry Ramaniraka:
i want to add a hotkey to hide subwindows.

Try SubWindow_Manager.mq5 from this.

SubWindow
SubWindow
  • votes: 26
  • 2017.11.03
  • fxsaber
  • www.mql5.com
All other files on this page provide examples/scenarios of library application; they are not needed for the operation of the library. Features Example The library use examples/scenarios are attached to the description. For a better understanding...
 
fxsaber:

Try SubWindow_Manager.mq5 from this.

Helo,
but  i need to do it on mt4.
And i don't want the subwindow to be erased, i want it be hidden/showed.

Thank you very much anyway.
Regards.

PS : interresting script.
 
Petr Nosek:


CHART_WINDOW_IS_VISIBLE is ReadOnly. You can't use ChartSetInteger() with CHART_WINDOW_IS_VISIBLE .
Hello,
What does "Read only" means ?
Is there a way to do it ? or fake it ?
 
Thierry Ramaniraka:
And i don't want the subwindow to be erased, i want it be hidden/showed.
Alternative - only Delete/Recovery.
 
Thierry Ramaniraka:
Hello,
What does "Read only" means ?
Is there a way to do it ? or fake it ?

ReadOnly means that you can read this parameter but you can't change it.

I think you can do it by using templates. ChartSaveTemplate() and  ChartApplyTemplate()

 
fxsaber:
Alternative - only Delete/Recovery.
Is your mt5 code can easily be converted for mt4 ?
By "easy" i mean : delete some lines and change the extension from "mq5" to "mq4".
NB : I am not very skilled in programmation...
 
Thierry Ramaniraka:
Is your mt5 code can easily be converted for mt4 ?
By "easy" i mean : delete some lines and change the extension from "mq5" to "mq4".
NB : I am not very skilled in programmation...
Easy.
 
fxsaber:
Easy.
Ok, thank you for all.
I will try it in the end of this week.

Regards.
 
Thierry Ramaniraka:
Ok, thank you for all.
I will try it in the end of this week.

Regards.

Hello,
I didn't tried yet... because finally i just "drag and drop" and delete the needed indicator. I can live with that.
A big thank you to all anyway.

Best regards.