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

Re: [GT] Input validation in Tools.pm



sam wrote:
Hi all.

Joao, are you able to do the same test with display_indicator.pl with I:STO and with I:LinearRegression please ?
For me these two indicators are broken...
-------
 ./display_indicator.pl -time 1min --full I:STO 02052006|more
Calculating indicator %K Fast[5] ...
-------


aloha sam

the --full directs display_indicator.pl to use all the data available
in the database. but indicator sto wants/needs/expects additional price
data prior to first available data. if you are seeing perl messages like:
Use of uninitialized value in numeric eq (==) at ../GT/Indicators/STO.pm line 221.
Use of uninitialized value in subtraction (-) at ../GT/Indicators/STO.pm line 222.
that is the situation.
if you get nothing, it's display_indicator.pl in need of some help.


you have a couple of options:

don't use the --full option, the default should pull in two years of data.
if that isn't enough prior data
then
use a --start argument that provides sufficient prior data for sto to get
itself initialized: in my db ens data starts on 2004-08-02 (14days).
  % display_indicator.pl --ti day --sta 2004-08-19  I:STO ENS
or
use I:STO2 (might only be found as a submitted patch file in the devel archive)
or
try the I:STO version in the experimental branch
or
maybe try the hacked display_indicator.pl (submitted as an alternate, not
a replacement for official display_indicator.pl from devel archive list
(sub: [GT] new version display_indicator.pl dated 02/26/08 16:51) -- be sure
to see the followup message too same thread). it wouldn't solve the initialization
problem, but it might make it easier to understand problems it encounters.

as far as I:LinearRegression -- someone should write about what this indicator
is used for in terms of technical analysis, it must be important ...

in any case, it's another initialization issue with the --full argument,
but this works:
  % display_indicator.pl --ti day --sta 2008-06-15 I:LinearRegression ENS 10 '{I:STO}'
as does
  % display_indicator.pl --ti day                  I:LinearRegression ENS 10 '{I:STO}'

also note that I:LinearRegression requires arguments, it provides no defaults.


ras



Thx.


--- En date de : Ven 4.7.08, João Costa <joaocosta
AT
zonalivre.org> a écrit :
De: João Costa <joaocosta
AT
zonalivre.org>
Objet: Re: [GT] Input validation in Tools.pm
À: devel
AT
geniustrader.org
Date: Vendredi 4 Juillet 2008, 1h02

You need to put something in DB::timeframes_available which GT won't recognize to reproduce this.
Try :
-------------------------------------------------------------------
DB::timeframes_available 30sec,day

-------------------------------------------------------------------

Then ask for some intraday data larger than 30 seconds, ie:
-------------------------------------------------------------------
display_indicator.pl --timeframe=hour I:Prices EURUSD

-------------------------------------------------------------------

All my patch does is to make sure that the timeframe names the user created in the config file are valid,
and if they are not, give the user a list of possible valid names.



I'm using the code in trunk, not any of the exp branches.




_____________________________________________________________________________ Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr