| 1 | # Copyright 2007, 2008, 2009, 2010 Kevin Ryde | ||
| 2 | |||
| 3 | # This file is part of Chart. | ||
| 4 | # | ||
| 5 | # Chart is free software; you can redistribute it and/or modify it under the | ||
| 6 | # terms of the GNU General Public License as published by the Free Software | ||
| 7 | # Foundation; either version 3, or (at your option) any later version. | ||
| 8 | # | ||
| 9 | # Chart is distributed in the hope that it will be useful, but WITHOUT ANY | ||
| 10 | # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
| 11 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | ||
| 12 | # details. | ||
| 13 | # | ||
| 14 | # You should have received a copy of the GNU General Public License along | ||
| 15 | # with Chart. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | |||
| 17 | package App::Chart::Series::OHLCVI; | ||
| 18 | use 5.010; | ||
| 19 | use strict; | ||
| 20 | use warnings; | ||
| 21 | use Carp; | ||
| 22 | use base 'App::Chart::Series'; | ||
| 23 | |||
| 24 | use constant default_linestyle => 'Candles'; | ||
| 25 | |||
| 26 | |||
| 27 | sub new { | ||
| 28 | my $class = shift; | ||
| 29 | my @opens = (); | ||
| 30 | my @highs = (); | ||
| 31 | my @lows = (); | ||
| 32 | my @closes = (); | ||
| 33 | my @volumes = (); | ||
| 34 | my @openints = (); | ||
| 35 | my $self = $class->SUPER::new (opens => \@opens, | ||
| 36 | highs => \@highs, | ||
| 37 | lows => \@lows, | ||
| 38 | closes => \@closes, | ||
| 39 | volumes => \@volumes, | ||
| 40 | openints => \@openints, | ||
| 41 | arrays => { opens => \@opens, | ||
| 42 | highs => \@highs, | ||
| 43 | lows => \@lows, | ||
| 44 | closes => \@closes, | ||
| 45 | volumes => \@volumes, | ||
| 46 | openints => \@openints }, | ||
| 47 | array_aliases => { 'values' => 'closes'}, | ||
| 48 | @_); | ||
| 49 | return $self; | ||
| 50 | } | ||
| 51 | |||
| 52 | use constant range_default_names => ('opens', 'highs', 'lows', 'closes'); | ||
| 53 | |||
| 54 | 1; | ||
| 55 | __END__ |