BarCount versus BarIndex

1 Star2 Stars3 Stars4 Stars5 Stars (8 votes, average: 4.63 out of 5)

One Response to “BarCount versus BarIndex”

  1. brian_z
    September 7th, 2007 | 10:15 pm

    BarCount does not represent the number of bars in the DATABASE,
    but in the ARRAYs in the current execution.

    The arrays have DYNAMIC size depending on zoom factor. That’s why BarCount may
    and will vary.

    For example if you have 20 years of data and you are watching just
    the last year
    AmiBroker does not need and does not use all the bars in the database to calculate
    the indicators for the last year.

    It uses the last year only PLUS some previous bars required to “stabilise” indicator
    The number of extra bars depends on the functions you use in the formula.

    If you want to use truly all bars you need to use SetBarsRequired function:

    Best regards,
    Tomasz Janeczko

    AmiBrokerYahooGroup message #114917 – AmiBrokerYahooGroup – Re: [amibroker] Simple question about BarCount