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

Re: [GT] scan.pl error



I'm seeing the same behavior on revision 545 (mar 1).
display_indicator and display_signal both are working as expected.

Looking at the error message:

Argument "day" isn't numeric in numeric gt (>) at ../GT/Tools.pm line
453, <> line 1.
Can't call method "timeframe" on an undefined value at
../GT/Calculator.pm line 70, <> line 1.

Corresponds to the if statement in this codeblock:

foreach(reverse(@tf)) {
  next if ($_ > $timeframe);
  $q = $db->get_last_prices($code, $max_loaded_items, $_);
  last if ($q->count > 0);
}

When I print out $_ it is "CLOSE" and $timeframe is "day".  Not sure
if that is correct or not (I'm a GT and perl newbie so I might be
missing the obvious).  I'm using a EOD beancounter yahoo database.

Todd






On Fri, Mar 21, 2008 at 5:10 PM, Robert A. Schmied <ras
AT
acm.org> wrote:
> Todd Turner wrote:
>  > Thanks Robert.  Files are attached.
>  >
>  > Todd
>  >
>
>  <snip>
>
>  ras [ 10145 ] %     scan.pl --verbose /var/tmp/marketfile.txt 2008-03-20 /var/tmp/system.txt
>
>
>  pre timeframe adjust:
>  date:   2008-03-20 00:00:00
>  start:
>  end:
>
>  post timeframe adjust:
>  date:   2008-03-20 00:00:00
>  start:
>  end:
>
>  working WIND Use of uninitialized value in array element at ../GT/CacheValues.pm line 73, <> line 1.
>  Use of uninitialized value in numeric lt (<) at ../GT/Signals/Generic/Increase.pm line 49, <> line 1.
>  Use of uninitialized value in array element at ../GT/CacheValues.pm line 73, <> line 1.
>  spec 1
>  working NVTL Use of uninitialized value in array element at ../GT/CacheValues.pm line 73, <> line 1.
>  Use of uninitialized value in numeric lt (<) at ../GT/Signals/Generic/Increase.pm line 49, <> line 1.
>  Use of uninitialized value in array element at ../GT/CacheValues.pm line 73, <> line 1.
>  spec 1
>  working QQQQ Use of uninitialized value in array element at ../GT/CacheValues.pm line 73, <> line 1.
>  Use of uninitialized value in numeric lt (<) at ../GT/Signals/Generic/Increase.pm line 49, <> line 1.
>  Use of uninitialized value in array element at ../GT/CacheValues.pm line 73, <> line 1.
>  spec 1
>
>
>  Signal: S:G:Increase {I:Prices CLOSE}
>
>  but of course i don't track WIND, NVTL, or QQQQ. so i changed them to
>  #WIND
>  #NVTL
>  #QQQQ
>  AAPL
>  ORCL
>  NTGR
>
>  and i'm seeing:
>  ras [ 10154 ] %    scan.pl --verbose /var/tmp/marketfile.txt 2008-03-20 /var/tmp/system.txt
>
>
>  pre timeframe adjust:
>  date:   2008-03-20 00:00:00
>  start:
>  end:
>
>  post timeframe adjust:
>  date:   2008-03-20 00:00:00
>  start:
>  end:
>
>  working AAPL spec 1
>  working ORCL spec 1
>  working NTGR spec 1
>
>
>  Signal: S:G:Increase {I:Prices CLOSE}
>   AAPL    APPLE INC
>   NTGR    NETGEAR INC
>   ORCL    ORACLE CORP
>
>
>  since your system file is so simple (and it works here) and the
>  market file is just list of symbols there are problems elsewhere.
>
>  so i have additional questions -- you just did an update recently?
>  have you edited scan.pl to use the gt/tools version of parse_date_str?
>
>  have you tried display_indicator.pl, display_signal.pl and graphic.pl?
>  do they work or have similar issues?
>  ras [ 10156 ] %    display_signal.pl  --timeframe day S:G:Increase AAPL '{I:Prices CLOSE}'
>         S:G:Increase
>  Testing signal Increase[{I:Prices CLOSE}] ...
>  Increase[{I:Prices CLOSE}][2007-06-05] = yes
>  Increase[{I:Prices CLOSE}][2007-06-06] = yes
>  Increase[{I:Prices CLOSE}][2007-06-07] = yes
>  Increase[{I:Prices CLOSE}][2007-06-08] = yes
>  Increase[{I:Prices CLOSE}][2007-06-11] = no
>  Increase[{I:Prices CLOSE}][2007-06-12] = yes
>  Increase[{I:Prices CLOSE}][2007-06-13] = no
>  Increase[{I:Prices CLOSE}][2007-06-14] = yes
>  .
>  .
>  .
>
>  can you easily configure alternate versions of gt (lots of disk space?)
>
>  i'd try to back up a week or so in the revisions to gt and see if that
>  makes a difference. let the list know if you revert and that fixes things!
>
>  best of luck -- keep us posted -- yell if you need additional assistance
>
>  aloha
>
>
>  ras
>
>