Actual number of visible candles and prices

To add comments, please log in or register
Felix
109
Felix  

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

- 1.30690 

- 1.30495 

- 1.30105

Simon Gniadkowski
17274
Simon Gniadkowski  
Read the documentation on the Window Functions
William Roeder
22428
William Roeder  
fjesq: that reads how many number of visible candles are actually in the active chart.
    top     = WindowPriceMax();
    bot     = WindowPriceMin();
    iLeft   = WindowFirstVisibleBar();
    iRight  = iLeft-WindowBarsPerChart();
    if (iRight < 0) iRight = 0;                             // Chart is shifted.
To add comments, please log in or register