Have a look at the following article and see if it helps clear things up for 
you.

http://www.amibroker.com/kb/2008/07/03/quickafl/

Mike

--- In [email protected], "zdomokos" <zdomo...@...> wrote:
>
> How does the system calculates BarCount in different modes, and how does in 
> know when to use what. What is the relationship between BarCount and 
> BarIndex, and how shall I know when to use what?
> I noticed, when BarCount is queried in a chart, it returns the count to the 
> drawn bars, when in exploration then the whole length of the array. Therefore 
> when I use the same afl to plot and explore, barcount has different values. 
> 
> Can somebody explain what goes on in the AFL engine when the afl is running 
> inside an indicator? How do the arrays get calculated? Are they calculated 
> for the whole length (max BarIndex()) or just for the BarCount which in 
> indicator mode is much shorter then in other modes.
> 
> Thanks.
> 
> 
> 
> This is that made me wonder:
> 
> Title +="\nfirstvisiblebarindex= "+firstvisiblebarindex+
> "\nfirstvisiblebar= "+firstvisiblebar+
> "\nLastvisiblebar= "+lastvisiblebar+
> "\nLastvisiblebarindex= "+lastvisiblebarindex+
> "\nBarindex= "+BarIndex()+
> "\nBarcount= "+BarCount +
> "\nBarIndexMax= "+LastValue( BarIndex() );
> 
> and this is what I get on the chart:
> 
> firstvisiblebarindex= 1528
> firstvisiblebar= 31
> Lastvisiblebar= 189
> Lastvisiblebarindex= 1686
> Barindex= 1533
> Barcount= 180
> BarIndexMax= 1676
>


Reply via email to