Panel Height instend of thier value

 

Hello everybody,

I would like to ask a few question concerning a separate window (subwindow), I have read it some were in the CodeBase that we could find out what the height of the subwindow attached.

Is it possible to code and used the height of this panel as value instead of using the calculated values, because their are a few line's with big differences in value.

I don't want to divide the value so that it could accommodate the lowest one or the other way around. 

Any comment and suggestion on this topic is highly appreciated.

Thanks

BEGINNER.

 
12BPRO2:

Hello everybody,

I would like to ask a few question concerning a separate window (subwindow), I have read it some were in the CodeBase that we could find out what the height of the subwindow attached.

You had better find it in the CodeBase . . . 
 
12BPRO2: find out what the height of the subwindow attached.

WindowExpertName - MQL4 Documentation -> WindowFind - MQL4 Documentation -> WindowPriceMax - MQL4 Documentation

 

Thanks Guys..... appreciate all the help here.....
 

12BPRO2:

I would like to ask a few question concerning a separate window (subwindow), I have read it some were in the CodeBase that we could find out what the height of the subwindow attached.

Is it possible to code and used the height of this panel as value instead of using the calculated values, because their are a few line's with big differences in value.

I don't want to divide the value so that it could accommodate the lowest one or the other way around.

  1. Unless you fix the min/max the subwindow autosizes, so why do you care.
  2. Use WindowFind to get the subwindow index and then use WindowPriceMax and related functions to get the current min/max
    datetime gclNewBar; void OnInitGetChartLimits(){  gclNewBar=0; }
                                                             #define WINDOW_MAIN 0
    void     GetChartLimits(int&iLeft, int&iRight, double&top, double&bot,int iW=0){
       if(gclNewBar != Time[0]){  gclNewBar = Time[0];    CallAgainOn(0,"gcl");
          // MT4 build 445: In the tester (visual mode,) on the first tick, these
          // routines return left=100, right=37 (depends on default bar scaling.)
          // This is what the chart looks like when you maximize it while it is
          // generating the FXT file. On ticks after that, it appears like the
          // left/right are correct but the hi/lo are one tick behind the displayed
          // chart. On the start of a new bar, the hi/lo can be off when a recent
          // extreme drops off but the scale hasn't resized. I tried calling
          // WindowRedraw() first but that did not change results. I don't know
       }  // about live charts.
       top      = WindowPriceMax(iW);   iLeft    = WindowFirstVisibleBar();
       bot      = WindowPriceMin(iW);   iRight   = iLeft-WindowBarsPerChart();       //{Log("t=",PriceToStr(top),
                                                                                     //    " b=",PriceToStr(bot),
                                                                                     //    " l=",iLeft,
                                                                                     //    " r=",iRight);
                                                                                     //}
       if(top-bot < pips2dbl)  top    = bot+pips2dbl;     // Avoid scroll bug / div0
       if(iRight < 0)          iRight = 0;                // Chart is shifted.
    }  // GetChartLimits
    







Reason: