[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GT] Re: Re: EMA incorrect when using --nb-item



It seems that the root of our misunderstanding was that you read the
pod and I read the Perl code. Since this is the development mailing
list, I just wanted to point out something I thought was a logical
error in the Perl code.

There is already --max-loaded-items, which clearly states (and I have
verified its claims by analyzing the Perl code) that it controls the
number of periods (back from the last period) that are loaded for a
given market from the data base. This option is effective only for
certain data base modules and ignored otherwise.

Why would anyone want to use both --max-loaded-items and --nb-item?
The first one already intelligently limits the data pulled from the
database, and the second one further creates a subset from the already
limited data. This results in displaying wrong data in the example
when calculating EMA.

Just to clarify something:

>    ./display_indicator.pl --nb-item=1 I:EMA YHOO 200
>
> is wrong, because the --nb-item=1 will eliminate most input data,
> but the command
>
>    ./display_indicator.pl --last-record I:EMA YHOO 200
>
> is correct, because it correctly uses the default analysis range,
> but only outputs the last record.

Both commands are absolutely equal because --last-record is a
synonymous for --nb-item=1

Best regards,
Nick