Installation details for Stockmonkey

97 views
Skip to first unread message

2t...@cox.net

unread,
Jan 29, 2014, 6:43:57 PM1/29/14
to stock...@googlegroups.com
Please advise on the installation details of Stockmonkey.
I downloaded the stockmonkey-2.9403.tar.gz file and extracted it. Then I ran the Makefile.PL. When I tried to run the DMI function I got an error message stating that the ATR.pm file could not be located. So I copied the Business directory from the extraction folder to my Perl/lib/math directory. The module ran without error but I'm not getting any results back. Just the "ADX: n/a." 
Did I doing something wrong with respect to the installation process?
 
Detailed guidance of the installation process would be most appreciated. 
 
2t

Paul Miller

unread,
Jan 29, 2014, 7:14:49 PM1/29/14
to stock...@googlegroups.com
The correct install proceedure, as for any Perl module, is to use the package system for the cpan built into the perl distribution. If you were using one of the command line flavors, I'd suggest typing "cpan install Math::Business::ATR" and let the CPAN sort out the details. For whatever reason, the capital P in Perl/lib/math makes me think windows... but the slashes are tilting the wrong way for that to be so.  On the chance that it's Mac OS or similar, maybe try "cpan ." from the distribution directory. 


If none of this stuff works, I'll need to know more about your Perl and your OS to make better guesses.

2t...@cox.net

unread,
Jan 30, 2014, 9:15:00 AM1/30/14
to stock...@googlegroups.com
Thanks for the recommendation Paul. The installation command you gave me seemed to work perfectly. It appears to have installed all of the Stockmonkey modules in the C:\strawberry\perl\site\lib\Math\Business directory.
However, when I ran the Math::Business::ATR module I received an error message stating "
 
Use of uninitialized value $t_low in subtraction (-) at C:/strawberry/perl/site/lib/Math/Business/ATR.pm line 55.
Use of uninitialized value $t_high in subtraction (-) at C:/strawberry/perl/site/lib/Math/Business/ATR.pm line 55.
Use of uninitialized value $t_high in subtraction (-) at C:/strawberry/perl/site/lib/Math/Business/ATR.pm line 56.
Use of uninitialized value $t_low in subtraction (-) at C:/strawberry/perl/site/lib/Math/Business/ATR.pm line 57.
Use of uninitialized value $t_low in subtraction (-) at C:/strawberry/perl/site/lib/Math/Business/ATR.pm line 83.
Use of uninitialized value $t_high in subtraction (-) at C:/strawberry/perl/site/lib/Math/Business/ATR.pm line 83.
something is clearly wrong, see note below above line at C:/strawberry/perl/site/lib/Math/Business/ATR.pm line 86."
 
I suspect there must be something wrong with the way I'm creating the @data_points array. My method used for creating the array:
 
 my @data_points = ();
 for (my $e = 0; $e < 14; $e++) {
   $data_points[$e][0] = $date_high{$rec{$i-$e}};
   $data_points[$e][1] = $date_low{$rec{$i-$e}};
   $data_points[$e][2] = $date_close{$rec{$i-$e}};
 }
$i above represents the record number contained within the hash for the date where the high, low, close values are located.
Please advise.
2t

2t...@cox.net

unread,
Jan 30, 2014, 12:16:52 PM1/30/14
to stock...@googlegroups.com
 
Additionally, I went ahead and did an array the hard way by plugging in the values by hand in the format that you provided in your example:
 
 my @data_points = ( [ 18.25, 18, 18.01 ], # high, low, close
      [ 18.05, 17.81, 18.02 ],
      [ 17.92, 17.73, 17.85 ],
      [ 17.85, 17.59, 17.84 ],
      [ 17.6, 17.37, 17.6 ],
      [ 17.52, 17.41, 17.51 ],
      [ 17.59, 17.45, 17.5 ],
      [ 17.74, 17.54, 17.54 ],
      [ 17.85, 17.6, 17.77 ],
      [ 17.76, 17.36, 17.67 ],
      [ 17.62, 17.29, 17.44 ],
      [ 17.68, 17.37, 17.58 ],
      [ 17.78, 17.2, 17.74 ],
      [ 17.46, 17.1, 17.33 ], ); 
and I got this message:
 
Can't locate object method "query" via package "0.336428571428572" (perhaps you forgot to load "0.336428571428572"?) at C:\My Documents\Stockmonkey\atr.pl line 902.
 
                   # choose one:
                   $atr->insert( @data_points );
                   # $atr->insert( $_ ) for @data_points; 
                   my $atr = $atr->query; 
line: 902    if( defined( my $q = $atr->query ) ) {     print "ATR: $q.\n";  } else {     print "ATR: n/a.\n"; }
#
Best regards,
 
2t
On Wednesday, January 29, 2014 5:43:57 PM UTC-6, 2t...@cox.net wrote:
Reply all
Reply to author
Forward
0 new messages