Is there a way to identify the first visible bar on the left in the chart window? That value changes every time when bars are added to the right and when zooming in or out.
- Is it possible to draw buttons on chart with the new MT4 update
- Auto Chart Zoom
- Stack order indicators
SemperAugustus:
Is there a way to identify the first visible bar on the left in the chart window? That value changes every time when bars are added to the right and when zooming in or out.
Is there a way to identify the first visible bar on the left in the chart window? That value changes every time when bars are added to the right and when zooming in or out.
WindowFirstVisibleBar()
Thanks.
#define WINDOW_MAIN 0 void GetChartLimits(int&iLeft, int&iRight, double&top, double&bot,int iW=0){ top = WindowPriceMax(iW); iLeft = WindowFirstVisibleBar(); bot = WindowPriceMin(iW); iRight = iLeft-WindowBarsPerChart(); if(top-bot < pips2dbl) top = bot+pips2dbl; // Avoid scroll bug / div0 if(iRight < 0) iRight = 0; // Chart is shifted. } // GetChartLimits //////////////////////////////////////////////////////////////////////////////// int start(){ int iL, iR; double pT, pB; GetChartLimits(iL, iR, pT, pB); Print("Left most bar started on " + TimeToStr(Time[iL], TIME_MINUTES) );Not hard if you RTFM

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register