nanceta::data;
use Scalar::Util qw(blessed);
use Browser::Open ();
use YAML::Any ();
use JSON::XS qw(encode_json);
use Template;
$PDL::doubleformat = "%0.6lf";
$| = 1;
has debug => 0;
has timezone =>
_$type.html");
## highcharts requires timestamp in milliseconds
## transpose the data for JSON charting
my $chart_type_pretty;
my @charts = ();
$type //= 'OHLC';
my $next_y_axi
chart_type_pretty = ($type eq 'CANDLE') ? 'Candlestick' : 'OHLC Price';
my $ppdl = encode_json pdl($data(,(0)) * 1000, $data(,(1)), $data(,(2)), $data(,(3)), $data(,(4)))->transpose->unpdl;
s::Gnuplot;
use JSON::XS qw(decode_json);
use LWP::UserAgent;
use DateTime;
use Try::Tiny;
use Path::Tiny;
sub get_data($) {
my $symbol = shift;
my $filename = lc "$symbol.json";
my $cont
ef;
}
}
if (defined $content and length($content)) {
my $jquotes = decode_json $content;
if (ref $jquotes eq 'ARRAY' and scalar(@$jquotes)) {
## sort quotes
ta::gemini;
use strict;
use warnings;
use 5.10.0;
use Try::Tiny;
use LWP::UserAgent;
use JSON::XS qw(decode_json);
use DateTime;
use App::financeta::utils qw(dumper log_filter);
use Log::Any '$log', f
nt;
if (defined $content and length($content)) {
my $jquotes = decode_json($content);
if (ref $jquotes eq 'ARRAY' and scalar(@$jquotes)) {
l
use strict;
use warnings;
use PDL;
use PDL::NiceSlice;
use PDL::Finance::TA;
use JSON::XS qw(decode_json encode_json);
use LWP::UserAgent;
use DateTime;
use Try::Tiny;
use Path::Tiny;
use Template;
use Browser::Open;
sub get_data($) {
my $symbol = shift;
my $filename = lc "$symbol.json";
my $content;
my $qdata;
my $url = sprintf("https://api.gemini.com/v2/candles/%s/%s", lc
ef;
}
}
if (defined $content and length($content)) {
my $jquotes = decode_json $content;
if (ref $jquotes eq 'ARRAY' and scalar(@$jquotes)) {
## sort quotes
:utils::log_filter;
use PDL;
use PDL::NiceSlice;
use PDL::Finance::TA;
use POSIX ();
use JSON::XS qw(encode_json);
$PDL::doubleformat = "%0.6lf";
has debug => 0;
has plot_engine => 'highcharts';
has
$xypdlclean);
push @plotinfo, {
title => $o->[0],
data => encode_json $xypdlclean->unpdl,
impulses => (ref $o->[2] eq 'HASH' and $o->[2]->{with} eq 'impuls
$xypdlclean);
push @plotinfo, {
title => $o->[0],
data => encode_json $xypdlclean->unpdl,
impulses => 1,
id => $o->[3],
};
}
re