[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [GT] Problem with display_indicator/EMA/revision 599
Regarding point number 1:
As far as I've known GT the scripts always returned 200 items of data
by default. Wasn't the 2Year idea added with the find_calculator
function ? It makes no sense to return 2 years of data if for
instance you're dealing with 1Minute data which you can in GT.
Returning 200 items is a fine behavior regardless of the time frame
being used, and the nb-items flag can be used to tweak that if needed.
As for point number 2, Robert changed his mind once you explained him
only 12 indicator files needed changing (i've read that thread like 2
days ago), and I also agree with your solution, so we can consider the
decision made to go with your proposed solution. Do you have an
implemention of it you can send ?
On Fri, Jul 25, 2008 at 1:40 PM, Weigert, Thomas <weigert
AT
mst.edu> wrote:
> Joao,
>
> here is my results, and now I understand better your concern:
>
> 1. in the first experiment, we return 2 years of data, not sure why the scripts would have returned 200 data items before. The documentation said 2 years. The code for this is:
> $first = $last - 2 * GT::DateTime::timeframe_ratio($YEAR,
> $calc->current_timeframe);
>
> 2. Yes, you should see no data, as the I:EMA cannot be computed from the first day on.
>
> So (1) is as designed, and (2) also, but I believe it is not how it should be. As you remembered below, I argued for that we should change calculate_indicator to try to find a period within the selected periods from which on it can return data.
>
> Robert argued against adding that, as it would require a change to all indicators that use calculate_indicator and have an algorithm that relies on every piece of data.
>
> Until this is decided how to handle, you can just comment out calculate_interval, and you will get all data (albeit somewhat slower).
>
> Th.
>
>
>
> João Costa wrote:
>
> Thanks.
>
> I'm now using the same data as you, I get different behaviour with the
> Text db module, but the underlying problems are still there.
>
>
>
> ________________________________
>
> From: João Costa [mailto:joaocosta
AT
zonalivre.org]
> Sent: Fri 7/25/2008 6:41 AM
> To: devel
AT
geniustrader.org
> Subject: Re: [GT] Problem with display_indicator/EMA/revision 599
>
>
>
> I've checked my db query and it is returning the data as expected,
> using a different symbol won't make any difference.
>
> From what i've debugged so far there are two different issues here:
>
> 1 - The change in revision 599 makes the scripts return all the
> available data, where before they would only return 200 items. This
> makes the --full flag redundant but i can live with that for now.
>
> 2 - The calculate_interval method in EMA fails to return any values if
> it can't calculate the first value.
>
>
> Because the scripts ask for the entire history, and since an EMA
> cannot be calculated for the first period of the entire history, it
> simply fails to return anything at all.
>
> I remember you and Robert discussing issue #2 on the list some time
> ago. I've read those messages this week. You had mentioned some fix
> which involved changing the implementation of calculate_interval in
> the Indicators, and that seemed fine to me. If you have that fix I
> think now would be a good time to apply it.
>
>
>