Download MetaTrader 5
To add comments, please log in or register
Order the development and track its status via your mobile phone.
SeaWolf
31
SeaWolf 2008.07.04 23:43 

Question...

Does anyone know if it is possible to "Lock" the size (specifically the height) of an indicator's separate window to prevent it from "scaling" when either maximizing the main chart window, or perhaps opening and closing the terminal window? I have created a simple indicator that is attached to the chart window using indicator_separate_window... and in order to properly view the information I would like to set a minimum height, or even better set the height at... say 150 pixels and not allow it to scale up, or down if I shift to full screen, take a screen shot, or have the chart open along with the terminal window... it should always be 150 pixels high.


As I'm thinking about it, would it be possible to make the separate window scrollable?


Any thoughts or suggestions would be great!


Thanks, SeaWolf

Ray
2655
Ray 2008.07.05 01:23  
No and no.
SeaWolf
31
SeaWolf 2008.07.07 21:05  
phy:
No and no.

Thank You...

That's what I thought!

Mark
7
Mark 2014.12.29 00:36  

Actually, there is a way if you'd bother to do the research.

void OnChartEvent(const int id,         // Event ID
                  const long& lparam,   // Parameter of type long event
                  const double& dparam, // Parameter of type double event
                  const string& sparam) { // Parameter of type string events

   IndicatorSetInteger(INDICATOR_HEIGHT, 100);

}

 

the above code fixes the indicator window height at 100. It resets the height of the window back to 100 whenever the user tries to re-size it. Remember to use:

#property indicator_height 100

 if you want the indicator to also start at 100 pixels in height ;-)

Ahhh - WHRoeder would be proud of this post... 

Keith Watford
Moderator
7899
Keith Watford 2014.12.29 07:25  
Mr_Bear:

Actually, there is a way if you'd bother to do the research.

 

the above code fixes the indicator window height at 100. It resets the height of the window back to 100 whenever the user tries to re-size it. Remember to use:

 if you want the indicator to also start at 100 pixels in height ;-)

Ahhh - WHRoeder would be proud of this post... 

Your post is rather condescending with "Actually, there is a way if you'd bother to do the research."

Maybe you can explain how people posting in 2008 could research a function that was not available then?

/
To add comments, please log in or register