I'm coding a program and I want to know how can I program in MQL4 an instruction that reads how many number of visible candles are actually in the active chart.
Also, I want to know is if possible to know also how many numbers of prices are visible at the moment and them values. With prices I mean the amount of prices that MT4 is showing in the right side of the chart
top = WindowPriceMax();
bot = WindowPriceMin();
iLeft = WindowFirstVisibleBar();
iRight = iLeft-WindowBarsPerChart();
if (iRight < 0) iRight = 0; // Chart is shifted.