Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Math::Business::DMI

Received: by 10.100.48.2 with SMTP id v2mr974817anv.12.1284548766806;
        Wed, 15 Sep 2010 04:06:06 -0700 (PDT)
X-BeenThere: stockmonkey@googlegroups.com
Received: by 10.101.194.29 with SMTP id w29ls390297anp.1.p; Wed, 15 Sep 2010
 04:06:06 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.100.242.19 with SMTP id p19mr65114anh.21.1284548766563; Wed,
 15 Sep 2010 04:06:06 -0700 (PDT)
Received: by f26g2000vbm.googlegroups.com with HTTP; Wed, 15 Sep 2010 04:06:06
 -0700 (PDT)
Date: Wed, 15 Sep 2010 04:06:06 -0700 (PDT)
In-Reply-To: <1952568f-d61e-4e71-95ab-aa9ca775e1b6@j30g2000vbr.googlegroups.com>
X-IP: 75.48.124.170
References: <e526234c-b303-4150-8b69-f9df5381e99d@q18g2000vbm.googlegroups.com>
 <88c47ce0-97ca-4cfe-95d9-e6d6f09c1403@u13g2000vbo.googlegroups.com> <1952568f-d61e-4e71-95ab-aa9ca775e1b6@j30g2000vbr.googlegroups.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9)
 Gecko/20100825 Ubuntu/10.04 (lucid) Firefox/3.6.9,gzip(gfe)
Message-ID: <1807ba93-9a25-4568-82c4-85af6303e60f@f26g2000vbm.googlegroups.com>
Subject: Re: Math::Business::DMI
From: Paul Miller <jett...@gmail.com>
To: stockmonkey <stockmonkey@googlegroups.com>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable


Nothing really jumps out at me regarding why the thing fails... But I
have some ideas regarding where to start looking.
Try Data::Dumper, to make sure what you're feeding to insert really is
what you mean to feed to insert:

warn "Just checking: " . Dumper(\@dmiData); sleep 1;

On Sep 14, 1:52=A0pm, BobBack <drchap...@gmail.com> wrote:
> =A0 =A0 =A0 =A0 push (@dmiData, [@dmiDataSlice]);
> =A0 =A0 =A0 =A0 if ( scalar (@dmiData) >5) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 shift @dmiData;
> =A0 =A0 =A0 =A0 }

This doesn't seem right to me either.  The ::DMI object already does
this type of shifting internally.  You would normally feed each
datapoint to it one at a time (or all at once) but I think you're
feeding a lot of the same data points over and over =97 I could be wrong
though, I don't have a clear understanding of your mainloop.

This is the intended paradigm:

while( my ($high, $low, $close) =3D $sth->fetchrow_array ) {

    $dmi->insert([ $high, $low, $close ]);

}

If you're only concerned with a 5-day moving computation, then
$dmiObject->set_days(5) ... although Wilder suggested 14 was the magic
number (for whatever reason).