Download MetaTrader 5

Display cut off bars on the chart?

To add comments, please log in or register
Register as a seller and start making profit!
Nikolay 2016.08.09 16:17 

When I use F12 "Step by Step" sometimes a bar that goes beyond the visible bottom or top of the chart is not displayed fully:

1) Is there any MT4 settings that can help correctly displaying such bars?

2) Is there a way to program correctly displaying such bars?

Keith Watford
Keith Watford 2016.08.09 20:46  
Try pressing F8 and make sure that the scale fix boxes are not checked
Nikolay 2016.08.10 07:09  

the scale fix checkboxes are disabled.

A cut off bar is displayed after the next bar closes.

whroeder1 2016.08.10 11:09  
Don't link to images, insert the image
Nikolay 2016.08.10 12:42  

Thanks WHRoeder! Image inserted.

And clarified that it happens when I use F12 "Step by Step".

whroeder1 2016.08.10 17:09  
nikolaygmt: happens when I use F12 "Step by Step".
Old bug 2012/08/18:
// 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. After that, it appears like the left/right are correct but the
// hi/lo are one tick behind the displayed chart. I don't know about
// live charts.
The scale doesn't resize until the end of processing the tick. F12 is one tick.
Nikolay 2016.08.11 17:56  

Thanks WHRoeder! I programmed a workaround. Does not show the full source code, but main logic is there and works in most cases when the user is using a self defined hotkey for F12 to navigate the chart.

   else if (id == CHARTEVENT_CHART_CHANGE) {
      if (isF12Pressed) {
         double chartLow;
         double chartHigh;
         ch.getChartVisibleLowHigh(chartLow, chartHigh);
         double winMaxPrice = WindowPriceMax();
         double winMinPrice = WindowPriceMin();
         if (ComparePrice(chartLow, LT, winMinPrice) || ComparePrice(chartHigh, GT, winMaxPrice)) {
            ch.setScaleFixMinMax(chartLow, chartHigh);
         else {
         isF12Pressed = false;
To add comments, please log in or register